Fixed #49
This commit is contained in:
parent
0eb7390ce3
commit
c573709471
|
@ -63,10 +63,13 @@ class Deezer:
|
||||||
json={'sng_id': sng_id},
|
json={'sng_id': sng_id},
|
||||||
headers=self.http_headers
|
headers=self.http_headers
|
||||||
)
|
)
|
||||||
|
result_json = site.json()
|
||||||
except:
|
except:
|
||||||
eventlet.sleep(2)
|
eventlet.sleep(2)
|
||||||
return self.get_track_filesizes(sng_id)
|
return self.get_track_filesizes(sng_id)
|
||||||
response = site.json()["results"]
|
if len(result_json['error']):
|
||||||
|
raise APIError(json.dumps(result_json['error']))
|
||||||
|
response = result_json.get("results")
|
||||||
filesizes = {}
|
filesizes = {}
|
||||||
for key, value in response.items():
|
for key, value in response.items():
|
||||||
if key.startswith("FILESIZE_"):
|
if key.startswith("FILESIZE_"):
|
||||||
|
|
Loading…
Reference in New Issue