scrape_one_post: Scrape one initial post

Description Usage Arguments Value Examples

View source: R/scrape_data.R

Description

Get the data from one initial post by entering its url

Usage

1
scrape_one_post(url, From = 1L, To = Inf, get_user_info = TRUE)

Arguments

url

URL to the post to scrape

From

The starting page number. Default is the first page

To

The ending page number. Default (Inf) is the last page (so all pages)

get_user_info

Get users' profile information. It includes the date of joining the forum and the total posts they have sent. The default is TRUE.

Value

A data frame

Examples

1
2
3
## get two pages of data from the post titled "Can Gastritis be cured?"
post_url = "https://patient.info/forums/discuss/can-gastritis-be-cured--613999"
scrape_one_post(url = post_url, From = 1, To = 2)

healthforum documentation built on Oct. 3, 2019, 9:04 a.m.