get_content: Scrape the Rulebook content

Description Usage Arguments Value Examples

View source: R/get_content.R

Description

Extract the full text or links from the PRA Rulebook given the URL.

Usage

1
get_content(x, type = "text", single_rule_selector = NULL)

Arguments

x

String. URL to scrape.

type

String. Type of information to scrape. "text" or "links".

single_rule_selector

String. Optional. CSS selector for individual rules.

Value

Data frame with URLs and corresponding text.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
get_content(
"http://www.prarulebook.co.uk/rulebook/Content/Chapter/242047/16-11-2007")
get_content(
"http://www.prarulebook.co.uk/rulebook/Content/Chapter/242047/16-11-2007",
"links")
get_content(
"http://www.prarulebook.co.uk/rulebook/Content/Rule/211145/18-06-2019#211145",
"text",
"yes")

## End(Not run)

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