mirror of
https://gitlab.com/RemixDev/deezer-py.git
synced 2025-01-01 12:26:06 +00:00
Fixed get_tracks_url when tracks are not released yet
This commit is contained in:
parent
1231ca0685
commit
185c9c81b9
|
@ -164,4 +164,6 @@ class Deezer:
|
||||||
except requests.exceptions.HTTPError:
|
except requests.exceptions.HTTPError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
if response.get('data') and response['data'][0].get('media'):
|
||||||
return response['data'][0]['media'][0]['sources'][0]['url']
|
return response['data'][0]['media'][0]['sources'][0]['url']
|
||||||
|
return None
|
||||||
|
|
Loading…
Reference in a new issue