Check for data
This commit is contained in:
parent
fdb6e2d180
commit
e612d7a10d
|
@ -40,7 +40,11 @@ class MpcBalance(Scraper):
|
||||||
response = self.session.post(url, headers = headers, data=json.dumps(data))
|
response = self.session.post(url, headers = headers, data=json.dumps(data))
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
date = response.headers.get('last-modified') or response.headers.get('date')
|
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]:
|
def determine_coins(self) -> list[dict]:
|
||||||
data: dict = {'path':[]}
|
data: dict = {'path':[]}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user