Hi everyone, I am working on a final project for my master's program.
One of the tasks is to get the Spotify artist URI of each artist(name), listed in a different dataset ('data'). And afterwards I have to add the URI of each artist to the original dataset.
I have been trying something, but I keep getting error messages.
Is there anyone that might be able to help this Python dummy out?
This is my code:

One of the tasks is to get the Spotify artist URI of each artist(name), listed in a different dataset ('data'). And afterwards I have to add the URI of each artist to the original dataset.
I have been trying something, but I keep getting error messages.

Is there anyone that might be able to help this Python dummy out?

This is my code:
import requests import json # Setting headers headers = { 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer BQDXxeeEiSPLfjhRS_IclrK5HsvL7-VD-EGWGQXUTzGw4DZjGPJKfvnAENy9hAtGplHgW7yngchunypC_1EV_b2CKz_qW6AOoh9fp0yG0ckyCArxAGSqa8aMzW4BHeLiBbD8L7HObUS7zX_XK-PGAvrQF_sUFMpIgpMtcsRi', } for name in data: response = requests.get(' https://api.spotify.com/v1/artists/{id}', headers=headers) # Making request json_data = json.loads(response.text) # Converting response into Python data structure print(json_data)
Larz60+ write Nov-18-2020, 04:09 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode tags on future posts.