library(rvest)
## Loading required package: xml2
movie=read_html("https://www.imdb.com/movies-in-theaters/")
newmovies=movie %>% html_nodes("h4 a") %>% html_text()
runtime= movie %>% html_nodes("time") %>% html_text()
runtime=as.numeric(gsub(" min","", runtime))
synopsis=movie %>% html_nodes(".overview-top .outline") %>% html_text()
mydata=data.frame(cbind(newmovies,runtime,synopsis))
mydata
## newmovies runtime
## 1 Mile 22 (2018) 94
## 2 Crazy Rich Asians (2018) 120
## 3 Alpha (2018) 96
## 4 Juliet, Naked (2018) 105
## 5 The Wife (2017) 100
## 6 We the Animals (2018) 94
## 7 Minding the Gap (2018) 93
## 8 Memoir of War (2017) 127
## 9 Billionaire Boys Club (2018) 108
## 10 The Little Mermaid (2018) 85
## 11 Mission: Impossible - Fallout (2018) 147
## 12 Christopher Robin (2018) 104
## 13 The Spy Who Dumped Me (2018) 117
## 14 Mamma Mia! Here We Go Again (2018) 114
## 15 The Equalizer 2 (2018) 121
## 16 Hotel Transylvania 3: Summer Vacation (2018) 97
## 17 Ant-Man and the Wasp (2018) 118
## 18 The Darkest Minds (2018) 104
## 19 Incredibles 2 (2018) 118
## 20 Teen Titans Go! To the Movies (2018) 84
## synopsis
## 1 \n An elite American intelligence officer, aided by a top-secret tactical command unit, tries to smuggle a mysterious police officer with sensitive information out of the country.
## 2 \n This contemporary romantic comedy, based on a global bestseller, follows native New Yorker Rachel Chu to Singapore to meet her boyfriend's family.
## 3 \n In the prehistoric past, a young man struggles to return home after being separated from his tribe during a buffalo hunt and finds a similarly lost wolf companion to start a friendship that would change humanity.
## 4 \n Juliet, Naked is the story of Annie (the long-suffering girlfriend of Duncan) and her unlikely transatlantic romance with once revered, now faded, singer-songwriter, Tucker Crowe, who also happens to be the subject of Duncan's musical obsession.
## 5 \n A wife questions her life choices as she travels to Stockholm with her husband, where he is slated to receive the Nobel Prize for Literature.
## 6 \n Manny, Joel, and Jonah tear their way through childhood and push against the volatile love of their parents. As Manny and Joel grow into versions of their father and Ma dreams of escape, Jonah embraces an imagined world all on his own.
## 7 \n Three young men bond together to escape volatile families in their Rust-Belt hometown. As they face adult responsibilities, unexpected revelations threaten their decade-long friendship.
## 8 \n Marguerite must navigate through the hardships of the Liberation after losing her husband and starting a relationship with the enemy during the War.
## 9 \n A group of wealthy boys in Los Angeles during the early 1980s establish a 'get-rich-quick' scam that turns deadly.
## 10 \n A young reporter and his niece discover a beautiful and enchanting creature they believe to be the real little mermaid.
## 11 \n Ethan Hunt and his IMF team, along with some familiar allies, race against time after a mission gone wrong.
## 12 \n A working-class family man, Christopher Robin, encounters his childhood friend Winnie-the-Pooh, who helps him to rediscover the joys of life.
## 13 \n Audrey and Morgan are best friends who unwittingly become entangled in an international conspiracy when one of the women discovers the boyfriend who dumped her was actually a spy.
## 14 \n Five years after the events of Mamma Mia! (2008), Sophie learns about her mother's past while pregnant herself.
## 15 \n Robert McCall serves an unflinching justice for the exploited and oppressed, but how far will he go when that is someone he loves?
## 16 \n Count Dracula and company participate in a cruise for sea-loving monsters, unaware that their boat is being commandeered by the monster-hating Van Helsing family.
## 17 \n As Scott Lang balances being both a Super Hero and a father, Hope van Dyne and Dr. Hank Pym present an urgent new mission that finds the Ant-Man fighting alongside The Wasp to uncover secrets from their past.
## 18 \n Imprisoned by an adult world that now fears everyone under 18, a group of teens form a resistance group to fight back and reclaim control of their future.
## 19 \n Bob Parr (Mr. Incredible) is left to care for the kids while Helen (Elastigirl) is out saving the world.
## 20 \n A villain's maniacal plan for world domination sidetracks five teenage superheroes who dream of Hollywood stardom.
Note to Larry: I was able to add in the synopeses, but ran into problems for adding in any other sections. My main issue was when the items wouldn’t fall into 20 perfectly aligned items: