scrape_fls_data: Scrape data from Fugazi Live Series pages

View source: R/scrape_fls_data.R

scrape_fls_dataR Documentation

Scrape data from Fugazi Live Series pages

Description

A simple function to scrape data from the Fugazi Live Series website using rvest.

Usage

scrape_fls_data(
  mygiddata = NULL,
  mylimit = 3,
  sleepseconds = 1,
  mycsvfilename = "gid_fls_id_sound_quality.csv",
  my_data_html_element = "dd strong"
)

Arguments

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

Examples

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)")


alexmitrani/Repeatr documentation built on June 11, 2024, 1:42 p.m.