mirror of
https://gitlab.com/RemixDev/deezer-py.git
synced 2024-12-28 18:36:23 +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:
|
||||
return None
|
||||
|
||||
return response['data'][0]['media'][0]['sources'][0]['url']
|
||||
if response.get('data') and response['data'][0].get('media'):
|
||||
return response['data'][0]['media'][0]['sources'][0]['url']
|
||||
return None
|
||||
|
|
Loading…
Reference in a new issue