[Debug] Retains the downloaded jsons

on the json/ directory.
This commit is contained in:
Luís Murta 2022-11-22 22:04:21 +00:00
parent a364d7b46d
commit 9345530f06
Signed by: satprog
GPG Key ID: 169EF1BBD7049F94

View File

@ -4,6 +4,7 @@ from requests import HTTPError, ReadTimeout
from dotenv import load_dotenv from dotenv import load_dotenv
from nordigen import NordigenClient from nordigen import NordigenClient
from uuid import uuid4 from uuid import uuid4
import json
import os import os
import webbrowser import webbrowser
@ -75,6 +76,9 @@ class NordigenInput(Input):
print(f"Couldn't download transactions for {account}") print(f"Couldn't download transactions for {account}")
continue continue
with open("json/" + bank.name + ".json", "w") as f:
json.dump(downloaded, f)
converted = [ converted = [
convert(t, bank) for t in downloaded["transactions"]["booked"] convert(t, bank) for t in downloaded["transactions"]["booked"]
] ]