diff options
Diffstat (limited to 'scripts/nb.py')
-rw-r--r-- | scripts/nb.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/nb.py b/scripts/nb.py index c3bbe40..2e2a7f9 100644 --- a/scripts/nb.py +++ b/scripts/nb.py @@ -1,16 +1,15 @@ #!/usr/bin/env python3 ''' Get exchange rates from nb ''' +import csv import os import sys -import csv import tempfile -from datetime import datetime -from datetime import timedelta -from tzlocal import get_localzone -import requests +from datetime import datetime, timedelta import common +import requests +from tzlocal import get_localzone # I'm not sure I understand Norges Banks json-model. It seems a lot easier to just get the CSV, and convert it to JSON. apiUrl = "https://data.norges-bank.no/api/data/EXR/B.EUR.NOK.SP?format=csv&locale=en" |