Learn R Programming

rzeit2 (version 0.2.3)

get_article_comments: Get article comments

Description

Get the article comments for a single url.

Usage

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.

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.

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.

Examples

Run this code
# NOT RUN {
url <- paste0("https://www.zeit.de/kultur/film/2018-04/",
"tatort-frankfurt-unter-kriegern-obduktionsbericht")
get_article_comments(url = url)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab