scrape_menu: Scrape the menu

Description Usage Arguments Value Examples

View source: R/scrape_menu.R

Description

Scrapes names and URLs from the PRA rulebook menu. The menu is on the left-hand side of the rulebook website.

Usage

1
scrape_menu(url, selector, rulebook_date)

Arguments

url

String. URL to scrape.

selector

String. CSS selector to scrape. Use Chrome with SelectorGadget to find the relevant selector.

rulebook_date

String. Optional date. Needed only for rule ID scraping.

Value

Data frame with names and URLs of rulebook elements.

Examples

1
2
3
4
5
## Not run: 
scrape_menu("http://www.prarulebook.co.uk/rulebook/Home/Handbook/16-11-2007", ".nav-child a")
scrape_menu("http://www.prarulebook.co.uk/rulebook/Content/Chapter/242047/16-11-2007", "a", rulebook_date = "16-11-2007")

## End(Not run)

mroliversmith/PRAClone documentation built on Jan. 11, 2020, 2:05 a.m.