<jupyter_start><jupyter_text>Construyendo URL<jupyter_code>url_base = 'https://api.spotify.com/v1'
ep_artist = '/artists/{artist_id}'
id_lp = '6XyY86QOPPrYVGvF9ch6wz'
url = url_base+ep_artist.format(artist_id=id_lp)
url
import requests
r = requests.get(url)
r.status_code
# No estamos autorizados para obtener una respuesta.
 r.json()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12362637362637363, 'fraction_numerical': 0.016483516483516484, 'mean_word_length': 7.690476190476191, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '629546', 'license': 'MIT', 'n_tokens_mistral': 163, 'n_tokens_neox': 160, 'n_words': 23, 'path': 'scripts/3-apis/1-construyendo-url/construyendo-url.ipynb', 'repo_name': 'OscarPalominoC/CursoWebScrapingExtraccionDatosWeb', 'size': '364'}