Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 988 Bytes

README.md

File metadata and controls

27 lines (21 loc) · 988 Bytes

N.E.C.T.A.R.

Nationwide ExChange raTe scrApeR

A quick and dirty Python script to scrape nationwide.co.uk's foreign exchange rates page

Installation

Install the requirements using pip install -r requirements.txt (uses Selenium)

Docs

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

Example

>>> from nectar import Nectar
>>> Nectar().get_last_updated()
02/03/2023
>>> Nectar().get_exchange_rate('CHF')
1.1012

License

Licensed under GNU General Public License v3.0