Nationwide ExChange raTe scrApeR
A quick and dirty Python script to scrape nationwide.co.uk's foreign exchange rates page
Install the requirements using pip install -r requirements.txt
(uses Selenium)
Method | Notes | Type |
---|---|---|
get_last_updated() |
Returns the DD/MM/YYYY timestamp of when the exchange rate data was last updated | str |
get_exchange_rate("currency") |
Returns the exchange rate for a specified currency (i.e. CHF, USD etc.) |
float |
_get_exchange_rates() |
Returns a dictionary of currencies and exchange rates ({'currency': 'exchange_rate'} ) |
dict |
>>> from nectar import Nectar
>>> Nectar().get_last_updated()
02/03/2023
>>> Nectar().get_exchange_rate('CHF')
1.1012
Licensed under GNU General Public License v3.0