View source: R/scrape_fls_data.R
scrape_fls_data | R Documentation |
A simple function to scrape data from the Fugazi Live Series website using rvest.
scrape_fls_data(
mygiddata = NULL,
mylimit = 3,
sleepseconds = 1,
mycsvfilename = "gid_fls_id_sound_quality.csv",
my_data_html_element = "dd strong"
)
mygiddata |
Name of data frame containing list of gids to be scraped (optional). If this is not specified gids from othervariables will be used (1048 of them). |
mylimit |
The number of shows from which to scrape sound quality rating. Set to a low number for testing. |
sleepseconds |
seconds to wait before getting info from the next page. |
mycsvfilename |
filename for the CSV file to which the results will be written. |
my_data_html_element |
html element that contains the data to be scraped |
scraped_data_1 <- scrape_fls_data(mygiddata = NULL, mylimit = 3, sleepseconds = 1, mycsvfilename = "gid_fls_id_sound_quality.csv", my_data_html_element = "dd strong")
scraped_data_2 <- scrape_fls_data(mygiddata = NULL, mylimit = 3, sleepseconds = 1, mycsvfilename = "gid_fls_id_played_with.csv", my_data_html_element = "dd:nth-child(10)")
mydf <- system.file("extdata", "gid_played_with_8.csv", package = "Repeatr")
scraped_data_3 <- scrape_fls_data(mygiddata = mydf, mylimit = 3, sleepseconds = 1, mycsvfilename = "gid_fls_id_played_with_8.csv", my_data_html_element = "dd:nth-child(8)")
mydf <- system.file("extdata", "gid_played_with_6.csv", package = "Repeatr")
scraped_data_4 <- scrape_fls_data(mygiddata = mydf, mylimit = 3, sleepseconds = 1, mycsvfilename = "gid_fls_id_played_with_6.csv", my_data_html_element = "dd:nth-child(6)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.