get_article_comments: Get article comments

Description Usage Arguments Details Value Warning Author(s) Examples

Description

Get the article comments for a single url.

Usage

1
2
get_article_comments(url, id = NULL, simplify = FALSE,
  timeout = NULL)

Arguments

url

character. A single character string or character vector.

id

character. You can provide your own id for each article. If is null the function uses the md5 hash of the url to create one.

simplify

logical. If true the function returns a data frame else it returns a nested list.

timeout

integer. Seconds to wait between queries.

Details

get_article_comments is the function, which fetches and parses article comments. This function may break in the future due to layout changes on the ZEIT ONLINE website.

Value

A list with comments and their respective replies. If the content lies beyond the paywall the function returns "[ZEIT PLUS CONTENT] You need a ZEIT PLUS account to access this content.".

Warning

Please use that function carefully because it uses a lot of HTTP requests. The extensive usage of this function may result in the blocking of IP.

Author(s)

Jan Dix <jan.dix@uni-konstanz.de>

Examples

1
2
3
4
5
6
## Not run: 
url <- paste0("https://www.zeit.de/kultur/film/2018-04/",
"tatort-frankfurt-unter-kriegern-obduktionsbericht")
get_article_comments(url = url)

## End(Not run)

jandix/rzeit2 documentation built on Sept. 30, 2020, 3:19 p.m.