web-scrapingfinancecurrency-exchange-rates

Python - Scarping exchange rate data from Danish National Bank website


I would like to scrap exchange rate data, for 5 currencies, from the Danish National Bank website: https://www.nationalbanken.dk/en/statistics/exchange_rates/pages/default.aspx on a daily basis, and having it added in an Excel, always at the end of already existing data.

I'm quite new into this so I'm just curios what would be the best way to do it and what should I pay special attention to? Thank you!


Solution

  • They helpfully provide download links for CSV files with the complete available history for each currency. I'd recommend you use that, and avoid directly scraping web pages where possible. There are multiple questions with excellent answers here on how to do that, e.g. Downloading csv file from a website using python