From 7e83ee819e1232f6d8c6b934e33b4f4fe46e0290 Mon Sep 17 00:00:00 2001 From: flavis Date: Thu, 17 Jun 2021 15:24:23 +0200 Subject: [PATCH] move data directory constant to config file --- scraping/config.R | 2 ++ scraping/fetch.R | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 scraping/config.R diff --git a/scraping/config.R b/scraping/config.R new file mode 100644 index 0000000..740a1e2 --- /dev/null +++ b/scraping/config.R @@ -0,0 +1,2 @@ +DOWNLOAD_DIR = "../data/" # warning: this is not created (should maybe) + diff --git a/scraping/fetch.R b/scraping/fetch.R index cfbf6e4..dc71d27 100644 --- a/scraping/fetch.R +++ b/scraping/fetch.R @@ -1,9 +1,8 @@ source("../utils/helpers.R") +source("config.R") library(RCurl) library(stringr) -DOWNLOAD_DIR = "../data/" # warning: this is not created (should maybe) - mk_absolute_url <- function(path) paste0("https://www.bundestag.de", path) mk_url <- function(offset) {