1
0

Check for data

This commit is contained in:
Jon Michael Aanes 2024-04-18 00:24:19 +02:00
parent fdb6e2d180
commit e612d7a10d
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA

View File

@ -40,7 +40,11 @@ class MpcBalance(Scraper):
response = self.session.post(url, headers = headers, data=json.dumps(data))
response.raise_for_status()
date = response.headers.get('last-modified') or response.headers.get('date')
return response.json(), date
json_data = response.json()
if json_data is None:
msg = 'No result data for ' + url
raise Exception(msg)
return json_data, date
def determine_coins(self) -> list[dict]:
data: dict = {'path':[]}