powered by
This function is used to scrape one element from a website.
scrap(link, node, clean = FALSE, askRobot = FALSE)
the link of the web page to scrape
the HTML or CSS element to consider, the SelectorGadget tool is highly recommended
logical. Should the function clean the extracted vector or not ? Default is FALSE.
logical. Should the function ask the robots.txt if we're allowed or not to scrape the web page ? Default is FALSE.
a character vector
# NOT RUN { # Extracting imdb top 250 movie titles link <- "https://www.imdb.com/chart/top/" node <- ".titleColumn a" scrap(link, node) # } # NOT RUN { # }
Run the code above in your browser using DataLab