You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@darshilparmar as per our discussion in general chat in discord , here are the comments and code correction snippets.
artist_list = []
for row in data['items']:
for key, value in row.items():
if key == "track":
for artist in value['artists']:
artist_dict = {'artist_id':artist['id'], 'artist_name':artist['name'],
'**external_url': artist['href']}**
artist_list.append(artist_dict)
artist_list = []
for row in data['items']:
for key, value in row.items():
if key == 'track':
for artist in value['artists']:
artist_dict = {'artist_id' : artist['id'],'artist_name' : artist['name'],
**'external_url' : artist['external_urls']['spotify'] }**
artist_list.append(artist_dict)
The text was updated successfully, but these errors were encountered:
@darshilparmar as per our discussion in general chat in discord , here are the comments and code correction snippets.
If we fetch external_url from artist['href'] we will get external_url': 'https://api.spotify.com/v1/artists/5YGY8feqx7naU7z4HrwZM6
. Instead, we may use this corrected snippet of code to navigate to the publicly available artist page directly like 'external_url': 'https://open.spotify.com/artist/0oOet2f43PA68X5RxKobEy'.
The text was updated successfully, but these errors were encountered: