get_protocol_links: Scrape the download-links for the plenary protocols from the...

Description Usage Arguments Value Examples

View source: R/protocol_download.R

Description

This function queries a file-registry-enpoint of the bundestag.de website repeadetly, to scrape the direct download links. There exist no tests for it, because this function interacts directly with external systems and causing load and expenses for the operator of them. Testing against them is considered bad practice. I could have mocked the server and it's responses, but this is not worth the effort given the fact that this function uses unsupported interfaces anyway.

Usage

1
2
3
4
get_protocol_links(
  base_url = "https://www.bundestag.de",
  registry_url = "/ajax/filterlist/de/services/opendata/543410-543410"
)

Arguments

base_url

The URL of the bundestag.de-domain this should continue to be "https://www.bundestag.de

registry_url

This is the path to the service the "https://www.bundestag.de/protokolle"-frontend hits, to get the links to the protocol files. The current default value is equivalent to the service path for the 19th period. This may change in the future. It is necessary to use the devtools of the browser to get this information.

directory

Directory where the files should be stored

Value

A vector of complete links to the protocol files.

Examples

1

bockstaller/dbtprotokoll documentation built on Dec. 31, 2020, 8:56 p.m.