Commit 9d1cc7a2 authored by Bruno Duyé's avatar Bruno Duyé
Browse files

Merge branch 'FixDownload' into 'master'

Fix download

See merge request !4
parents 6c3e0e1c 62c00844
Pipeline #240760 passed with stage
in 15 minutes and 33 seconds
......@@ -36,7 +36,7 @@ import requests
import buba_common as bc
HELP_ON_TIMESERIES_URL = "https://www.bundesbank.de/en/statistics/time-series-databases/-/help-on-the-time-series-databases-750894" # noqa
HELP_ON_TIMESERIES_URL = "https://www.bundesbank.de/en/statistics/time-series-databases/help-on-the-time-series-databases/download-options" # noqa
DATASETS_URL = "https://www.bundesbank.de/cae/servlet/StatisticDownload?its_fileFormat=Archive&mode=its" # noqa
TOPICS_URL = "https://www.bundesbank.de/cae/servlet/StatisticDownload?its_fileFormat=Archive&mode=its&tree=" # noqa
STRUCTURE_URL = "https://www.bundesbank.de/cae/servlet/StatisticDownload?metaDSI="
......@@ -97,6 +97,7 @@ def download_topics(topics_url, topics_codes, target_dir: Path):
for code in sorted(topics_codes):
log.info("Downloading topic %r", code)
topic_dir = topics_main_dir / code
print(topics_url + code)
r = requests.get(topics_url + code)
if not r.ok:
log.error("A download error occurred, skipping topic %r...", code)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment