I am trying to extract the titles using rvest
from rotten tomatoes
I use the following codes:
urlhtml<-read_html("http://www.rottentomatoes.com/browse/opening/")
df<-html_text(html_nodes(urlhtml,xpath="//*[@id='movies-collection']/div/div/div[2]/a"))
the xpath
is derived from google chrome so I believe it's correct, however, it returns empty list... I can't figure out what is wrong.
Could anyone help?
Much appreciated
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…