diff --git a/notebooks/spotify_rest_api_challenge.ipynb b/notebooks/spotify_rest_api_challenge.ipynb deleted file mode 100644 index 5e4f8f7..0000000 --- a/notebooks/spotify_rest_api_challenge.ipynb +++ /dev/null @@ -1,243 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "ef05c1d6", - "metadata": {}, - "source": [ - "![spotify_logo](../img/spotify_logo.png)\n", - "\n", - "# Spotify REST API Challenge\n", - "\n", - "__What to listen?__\n", - "\n", - "Create your own playlist based on the related artists and their most popular tracks using the [Spotify REST API](https://developer.spotify.com/)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "17a49776", - "metadata": {}, - "outputs": [], - "source": [ - "# Imports\n", - "\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "4e97884c", - "metadata": {}, - "source": [ - "### Get access!!!\n", - "\n", - "Get your `client_id` and `client_secret` to generate your __token__ access" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "7b5d2e52", - "metadata": {}, - "outputs": [], - "source": [ - "# Generate token with a POST request\n", - "\n", - "client_id = # CLIENT ID\n", - "client_secret = # CLIENT SECRET\n", - "auth_url = 'https://accounts.spotify.com/api/token'" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c7901d1e", - "metadata": {}, - "outputs": [], - "source": [ - "auth_response = requests.post(auth_url, {'grant_type': 'client_credentials',\n", - " 'client_id': client_id,\n", - " 'client_secret': client_secret}).json()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "262e7e18", - "metadata": {}, - "outputs": [], - "source": [ - "access_token = auth_response['access_token']\n", - "auth_response" - ] - }, - { - "cell_type": "markdown", - "id": "e617caff", - "metadata": {}, - "source": [ - "### Set your main variables!!!\n", - "\n", - "Set the `base_uri` (i.e.: end-point), parameters and `headers` for your __GET__ operations" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "62e6d4fb", - "metadata": {}, - "outputs": [], - "source": [ - "# Base end-point construction\n", - "\n", - "base_url = 'https://api.spotify.com/v1/'\n", - "resource = 'artists/'\n", - "\n", - "header_info = {'Authorization': 'Bearer {token}'.format(token=access_token)}" - ] - }, - { - "cell_type": "markdown", - "id": "16660a9b", - "metadata": {}, - "source": [ - "### Create your new playlist!!!\n", - "\n", - "Use [`/related-artists`](https://developer.spotify.com/documentation/web-api/reference/#/operations/get-an-artists-related-artists) and [`/top-tracks`](https://developer.spotify.com/documentation/web-api/reference/#/operations/get-an-artists-top-tracks) in order to get the data that you need.\n", - "\n", - "__Here you have the different artists to start with:__\n", - "\n", - "- __Option 1:__ 0L8ExT028jH3ddEcZwqJJ5\n", - "\n", - "- __Option 2:__ 4Y7tXHSEejGu1vQ9bwDdXW\n", - "\n", - "- __Option 3:__ 6FBDaR13swtiWwGhX1WQsP\n", - "\n", - "- __Option 4:__ 0kyQwKHCZnKE7kTXkxXjrB\n", - "\n", - "- __Option 5:__ 2d0hyoQ5ynDBnkvAbJKORj\n", - "\n", - "- __Option 6:__ 3bgsNtcf5d5h9jbQbohfBK\n", - "\n", - "- __Option 7:__ 7mWCSSOYqm4E9mB7V4ot6S\n", - "\n", - "- __Option 8:__ 64KEffDW9EtZ1y2vBYgq8T\n", - "\n", - "- __Option 9:__ 4k1ELeJKT1ISyDv8JivPpB\n", - "\n", - "- __Option 10:__ 4Z8W4fKeB5YxbusRsdQVPb\n", - "\n", - "- __Option 11:__ 26dSoYclwsYLMAKD3tpOr4\n", - "\n", - "- __Option 12:__ 7y97mc3bZRFXzT2szRM4L4\n", - "\n", - "- __Option 13:__ 1w5Kfo2jwwIPruYS2UWh56\n", - "\n", - "\n", - "> Remember to check the [Requests](https://requests.readthedocs.io/en/latest/) library docs!!!\n", - "\n", - "---" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "04f85940", - "metadata": {}, - "outputs": [], - "source": [ - "# Here you can complete your endpoint URI\n", - "\n", - "full_endpoint = \n", - "full_endpoint" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "50ec3959", - "metadata": {}, - "outputs": [], - "source": [ - "# Start building your playlist!!!\n", - "\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "98827be6", - "metadata": {}, - "source": [ - "---\n", - "\n", - "### Bonus track!!!\n", - "\n", - "You can publish your own Playlist with [`/playlists`](https://developer.spotify.com/documentation/web-api/reference/#/operations/create-playlist) and [`/tracks`](https://developer.spotify.com/documentation/web-api/reference/#/operations/add-tracks-to-playlist).\n", - "\n", - "![I quit](https://media.giphy.com/media/gui67fZ3xIneM/giphy.gif)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "2e5f0905", - "metadata": {}, - "outputs": [], - "source": [ - "# Bonus\n", - "\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "id": "9436b623", - "metadata": {}, - "source": [ - "---" - ] - }, - { - "cell_type": "markdown", - "id": "a9487ef7", - "metadata": {}, - "source": [ - "You can always try with the [wrapper](https://github.com/plamere/spotipy)!!!\n", - "\n", - "![I quit](https://media.giphy.com/media/3oFzlXPvXYZ4q8VQOs/giphy.gif)" - ] - }, - { - "cell_type": "markdown", - "id": "0a399ce8", - "metadata": {}, - "source": [ - "---" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python [conda env:.conda-ironhack]", - "language": "python", - "name": "conda-env-.conda-ironhack-py" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.7.11" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/spotify_rest_api_challenge_finished.ipynb b/notebooks/spotify_rest_api_challenge_finished.ipynb new file mode 100644 index 0000000..93b794c --- /dev/null +++ b/notebooks/spotify_rest_api_challenge_finished.ipynb @@ -0,0 +1,1636 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "ef05c1d6", + "metadata": {}, + "source": [ + "![spotify_logo](../img/spotify_logo.png)\n", + "\n", + "# Spotify REST API Challenge\n", + "\n", + "__What to listen?__\n", + "\n", + "Create your own playlist based on the related artists and their most popular tracks using the [Spotify REST API](https://developer.spotify.com/)" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "17a49776", + "metadata": {}, + "outputs": [], + "source": [ + "# Imports\n", + "\n", + "import pandas as pd\n", + "import numpy as np\n", + "import requests" + ] + }, + { + "cell_type": "markdown", + "id": "4e97884c", + "metadata": {}, + "source": [ + "### Get access!!!\n", + "\n", + "Get your `client_id` and `client_secret` to generate your __token__ access" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "7b5d2e52", + "metadata": {}, + "outputs": [], + "source": [ + "# Generate token with a POST request\n", + "\n", + "client_id = \n", + "client_secret = \n", + "auth_url = 'https://accounts.spotify.com/api/token'" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "c7901d1e", + "metadata": {}, + "outputs": [], + "source": [ + "auth_response = requests.post(auth_url, {'grant_type': 'client_credentials',\n", + " 'client_id': client_id,\n", + " 'client_secret': client_secret}).json()" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "9856862b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'access_token': 'BQAe5qa2p7O2ZyXaquGQ8fWR1aGj2Mauf3p9W9Pn5KXaMvnRrCcOJOl_WjchSMwetUQw-Cco5OIcSNdCIwO7wgqoQweve_oQIh-Pxuzx37Ue_VSBAuj9',\n", + " 'token_type': 'Bearer',\n", + " 'expires_in': 3600}" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "auth_response" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "262e7e18", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'BQAe5qa2p7O2ZyXaquGQ8fWR1aGj2Mauf3p9W9Pn5KXaMvnRrCcOJOl_WjchSMwetUQw-Cco5OIcSNdCIwO7wgqoQweve_oQIh-Pxuzx37Ue_VSBAuj9'" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "access_token = auth_response['access_token']\n", + "access_token" + ] + }, + { + "cell_type": "markdown", + "id": "e617caff", + "metadata": {}, + "source": [ + "### Set your main variables!!!\n", + "\n", + "Set the `base_uri` (i.e.: end-point), parameters and `headers` for your __GET__ operations" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "62e6d4fb", + "metadata": {}, + "outputs": [], + "source": [ + "# Base end-point construction\n", + "\n", + "base_url = 'https://api.spotify.com/v1/'\n", + "resource = 'artists/'\n", + "\n", + "header_info = {'Authorization': 'Bearer {token}'.format(token=access_token)}" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "b9e2b70c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'Authorization': 'Bearer BQAe5qa2p7O2ZyXaquGQ8fWR1aGj2Mauf3p9W9Pn5KXaMvnRrCcOJOl_WjchSMwetUQw-Cco5OIcSNdCIwO7wgqoQweve_oQIh-Pxuzx37Ue_VSBAuj9'}" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "header_info" + ] + }, + { + "cell_type": "markdown", + "id": "16660a9b", + "metadata": {}, + "source": [ + "### Create your new playlist!!!\n", + "\n", + "Use [`/related-artists`](https://developer.spotify.com/documentation/web-api/reference/#/operations/get-an-artists-related-artists) and [`/top-tracks`](https://developer.spotify.com/documentation/web-api/reference/#/operations/get-an-artists-top-tracks) in order to get the data that you need.\n", + "\n", + "__Here you have the different artists to start with:__\n", + "\n", + "- __Option 1:__ 0L8ExT028jH3ddEcZwqJJ5\n", + "\n", + "- __Option 2:__ 4Y7tXHSEejGu1vQ9bwDdXW\n", + "\n", + "- __Option 3:__ 6FBDaR13swtiWwGhX1WQsP\n", + "\n", + "- __Option 4:__ 0kyQwKHCZnKE7kTXkxXjrB\n", + "\n", + "- __Option 5:__ 2d0hyoQ5ynDBnkvAbJKORj\n", + "\n", + "- __Option 6:__ 3bgsNtcf5d5h9jbQbohfBK\n", + "\n", + "- __Option 7:__ 7mWCSSOYqm4E9mB7V4ot6S\n", + "\n", + "- __Option 8:__ 64KEffDW9EtZ1y2vBYgq8T\n", + "\n", + "- __Option 9:__ 4k1ELeJKT1ISyDv8JivPpB\n", + "\n", + "- __Option 10:__ 4Z8W4fKeB5YxbusRsdQVPb\n", + "\n", + "- __Option 11:__ 26dSoYclwsYLMAKD3tpOr4\n", + "\n", + "- __Option 12:__ 7y97mc3bZRFXzT2szRM4L4\n", + "\n", + "- __Option 13:__ 1w5Kfo2jwwIPruYS2UWh56\n", + "\n", + "\n", + "> Remember to check the [Requests](https://requests.readthedocs.io/en/latest/) library docs!!!\n", + "\n", + "---" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "04f85940", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'https://api.spotify.com/v1/artists/1w5Kfo2jwwIPruYS2UWh56'" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Here you can complete your endpoint URI\n", + "\n", + "artist_id = '1w5Kfo2jwwIPruYS2UWh56'\n", + "\n", + "method_01 = '/related-artists'\n", + "method_02 = '/top-tracks'\n", + "\n", + "country = '?country=ES'\n", + "\n", + "full_endpoint = base_url + resource + artist_id\n", + "full_endpoint" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "50ec3959", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Start building your playlist!!!\n", + "\n", + "res = requests.get(full_endpoint, headers=header_info)\n", + "res" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "b598dc31", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "requests.models.Response" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "type(res)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "1968ab9b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "dict" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "type(res.json())" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "8ad55dcc", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "10" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "res_dict = res.json()\n", + "len(res_dict)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "58ad297c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "dict_keys(['external_urls', 'followers', 'genres', 'href', 'id', 'images', 'name', 'popularity', 'type', 'uri'])" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "key_list = res_dict.keys()\n", + "key_list" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "16bd1c9b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "external_urls ---> {'spotify': 'https://open.spotify.com/artist/1w5Kfo2jwwIPruYS2UWh56'}\n", + "followers ---> {'href': None, 'total': 8096624}\n", + "genres ---> ['grunge', 'permanent wave', 'rock']\n", + "href ---> https://api.spotify.com/v1/artists/1w5Kfo2jwwIPruYS2UWh56\n", + "id ---> 1w5Kfo2jwwIPruYS2UWh56\n", + "images ---> [{'height': 640, 'url': 'https://i.scdn.co/image/ab6761610000e5eb122d1145d880736383742ebc', 'width': 640}, {'height': 320, 'url': 'https://i.scdn.co/image/ab67616100005174122d1145d880736383742ebc', 'width': 320}, {'height': 160, 'url': 'https://i.scdn.co/image/ab6761610000f178122d1145d880736383742ebc', 'width': 160}]\n", + "name ---> Pearl Jam\n", + "popularity ---> 76\n", + "type ---> artist\n", + "uri ---> spotify:artist:1w5Kfo2jwwIPruYS2UWh56\n" + ] + } + ], + "source": [ + "for key in key_list:\n", + " print(key, '--->' ,res_dict[key])" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "674d1541", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "https://api.spotify.com/v1/artists/1w5Kfo2jwwIPruYS2UWh56\n" + ] + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "full_endpoint_01 = full_endpoint + method_01 # + country\n", + "print(full_endpoint)\n", + "\n", + "res_01 = requests.get(full_endpoint_01, headers=header_info)\n", + "res_01" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "ee113556", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0T7JQxpy1Li93vLNirbv0Z'},\n", + " 'followers': {'href': None, 'total': 540790},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'blues rock',\n", + " 'grunge',\n", + " 'rock',\n", + " 'supergroup'],\n", + " 'href': 'https://api.spotify.com/v1/artists/0T7JQxpy1Li93vLNirbv0Z',\n", + " 'id': '0T7JQxpy1Li93vLNirbv0Z',\n", + " 'images': [{'height': 128,\n", + " 'url': 'https://i.scdn.co/image/1e30ffa1b0abce432e9598f2f7746fe65ac22b9c',\n", + " 'width': 198},\n", + " {'height': 41,\n", + " 'url': 'https://i.scdn.co/image/b3367400bcc21b641d606125205aceecf596ac16',\n", + " 'width': 64}],\n", + " 'name': 'Mad Season',\n", + " 'popularity': 52,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0T7JQxpy1Li93vLNirbv0Z'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/2UazAtjfzqBF0Nho2awK4z'},\n", + " 'followers': {'href': None, 'total': 3158714},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'grunge',\n", + " 'hard rock',\n", + " 'nu metal',\n", + " 'pop rock',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/2UazAtjfzqBF0Nho2awK4z',\n", + " 'id': '2UazAtjfzqBF0Nho2awK4z',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb4bb64f87db255d76538b905f',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051744bb64f87db255d76538b905f',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1784bb64f87db255d76538b905f',\n", + " 'width': 160}],\n", + " 'name': 'Stone Temple Pilots',\n", + " 'popularity': 69,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:2UazAtjfzqBF0Nho2awK4z'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0iHb0mCbqZTYeb4y9Pirrd'},\n", + " 'followers': {'href': None, 'total': 1130409},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'grunge',\n", + " 'hard rock',\n", + " 'pop rock',\n", + " 'rock',\n", + " 'supergroup'],\n", + " 'href': 'https://api.spotify.com/v1/artists/0iHb0mCbqZTYeb4y9Pirrd',\n", + " 'id': '0iHb0mCbqZTYeb4y9Pirrd',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebf47df3543858204550cc19d3',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174f47df3543858204550cc19d3',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178f47df3543858204550cc19d3',\n", + " 'width': 160}],\n", + " 'name': 'Temple Of The Dog',\n", + " 'popularity': 57,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0iHb0mCbqZTYeb4y9Pirrd'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/5xUf6j4upBrXZPg6AI4MRK'},\n", + " 'followers': {'href': None, 'total': 3913504},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'classic rock',\n", + " 'grunge',\n", + " 'hard rock',\n", + " 'nu metal',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/5xUf6j4upBrXZPg6AI4MRK',\n", + " 'id': '5xUf6j4upBrXZPg6AI4MRK',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebafa254b2a224584485286526',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174afa254b2a224584485286526',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178afa254b2a224584485286526',\n", + " 'width': 160}],\n", + " 'name': 'Soundgarden',\n", + " 'popularity': 69,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:5xUf6j4upBrXZPg6AI4MRK'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/64tNsm6TnZe2zpcMVMOoHL'},\n", + " 'followers': {'href': None, 'total': 4435210},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'grunge',\n", + " 'hard rock',\n", + " 'nu metal',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/64tNsm6TnZe2zpcMVMOoHL',\n", + " 'id': '64tNsm6TnZe2zpcMVMOoHL',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb6114a63659d0d5c0a801f733',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051746114a63659d0d5c0a801f733',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1786114a63659d0d5c0a801f733',\n", + " 'width': 160}],\n", + " 'name': 'Alice In Chains',\n", + " 'popularity': 73,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:64tNsm6TnZe2zpcMVMOoHL'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/78SHxLdtysAXgywQ4vE0Oa'},\n", + " 'followers': {'href': None, 'total': 1698236},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'grunge',\n", + " 'nu metal',\n", + " 'pop rock',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/78SHxLdtysAXgywQ4vE0Oa',\n", + " 'id': '78SHxLdtysAXgywQ4vE0Oa',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebd209395dc5321f4b5163aed4',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174d209395dc5321f4b5163aed4',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178d209395dc5321f4b5163aed4',\n", + " 'width': 160}],\n", + " 'name': 'Bush',\n", + " 'popularity': 63,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:78SHxLdtysAXgywQ4vE0Oa'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/5sD1ZLf2dGQ9gQ3YJl1eAd'},\n", + " 'followers': {'href': None, 'total': 1091661},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'blues rock',\n", + " 'grunge',\n", + " 'pop rock',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/5sD1ZLf2dGQ9gQ3YJl1eAd',\n", + " 'id': '5sD1ZLf2dGQ9gQ3YJl1eAd',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebdcc3fe6af94c5c178a36d006',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174dcc3fe6af94c5c178a36d006',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178dcc3fe6af94c5c178a36d006',\n", + " 'width': 160}],\n", + " 'name': 'Blind Melon',\n", + " 'popularity': 63,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:5sD1ZLf2dGQ9gQ3YJl1eAd'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0XHiH53dHrvbwfjYM7en7I'},\n", + " 'followers': {'href': None, 'total': 1961351},\n", + " 'genres': ['alternative metal', 'alternative rock', 'grunge', 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/0XHiH53dHrvbwfjYM7en7I',\n", + " 'id': '0XHiH53dHrvbwfjYM7en7I',\n", + " 'images': [{'height': 1000,\n", + " 'url': 'https://i.scdn.co/image/85eb1c9e95d3b74bd7304e8b89d7c48601f07845',\n", + " 'width': 1000},\n", + " {'height': 640,\n", + " 'url': 'https://i.scdn.co/image/01febd15ceb41784674011a449e41e3725e0455f',\n", + " 'width': 640},\n", + " {'height': 200,\n", + " 'url': 'https://i.scdn.co/image/f74e645827ff0bd0dfaae16f9a77eea34158ec9f',\n", + " 'width': 200},\n", + " {'height': 64,\n", + " 'url': 'https://i.scdn.co/image/deaf1957024c5fbc09d40068b89197d637e11e69',\n", + " 'width': 64}],\n", + " 'name': 'Chris Cornell',\n", + " 'popularity': 62,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0XHiH53dHrvbwfjYM7en7I'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/02NfyD6AlLA12crYzw5YcR'},\n", + " 'followers': {'href': None, 'total': 1292772},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'blues rock',\n", + " 'funk metal',\n", + " 'funk rock',\n", + " 'grunge',\n", + " 'nu metal',\n", + " 'permanent wave',\n", + " 'pop rock',\n", + " 'rap rock',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/02NfyD6AlLA12crYzw5YcR',\n", + " 'id': '02NfyD6AlLA12crYzw5YcR',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb6181668c9b31f2505039ba33',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051746181668c9b31f2505039ba33',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1786181668c9b31f2505039ba33',\n", + " 'width': 160}],\n", + " 'name': \"Jane's Addiction\",\n", + " 'popularity': 58,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:02NfyD6AlLA12crYzw5YcR'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/3XR64HmFo4OvexUUNW7TP0'},\n", + " 'followers': {'href': None, 'total': 317160},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'funk metal',\n", + " 'grunge',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/3XR64HmFo4OvexUUNW7TP0',\n", + " 'id': '3XR64HmFo4OvexUUNW7TP0',\n", + " 'images': [{'height': 731,\n", + " 'url': 'https://i.scdn.co/image/ced0e4d64f4915766d0cdf47541297d53c8281ac',\n", + " 'width': 1000},\n", + " {'height': 468,\n", + " 'url': 'https://i.scdn.co/image/f65d3b3b8207331715d76ce7c0c496e98e2d6c7e',\n", + " 'width': 640},\n", + " {'height': 146,\n", + " 'url': 'https://i.scdn.co/image/1f236af9d80d21e63a1337427115923ed69055ab',\n", + " 'width': 200},\n", + " {'height': 47,\n", + " 'url': 'https://i.scdn.co/image/7af1f30406ab8379eab32bf95ef6ae33aea8dcf8',\n", + " 'width': 64}],\n", + " 'name': 'Mother Love Bone',\n", + " 'popularity': 46,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:3XR64HmFo4OvexUUNW7TP0'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/07jc1IMGtecDZzOL9cP50t'},\n", + " 'followers': {'href': None, 'total': 360265},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'grunge',\n", + " 'nu metal',\n", + " 'pop rock',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/07jc1IMGtecDZzOL9cP50t',\n", + " 'id': '07jc1IMGtecDZzOL9cP50t',\n", + " 'images': [{'height': 654,\n", + " 'url': 'https://i.scdn.co/image/97649b63c5520446ad303326e53906876e364e22',\n", + " 'width': 1000},\n", + " {'height': 419,\n", + " 'url': 'https://i.scdn.co/image/343e407da4ae28a78862be292f0384bb5d07192e',\n", + " 'width': 640},\n", + " {'height': 131,\n", + " 'url': 'https://i.scdn.co/image/4ccfedb6f159bd63330be03bead9d96d2f323b00',\n", + " 'width': 200},\n", + " {'height': 42,\n", + " 'url': 'https://i.scdn.co/image/86a17596bd17d19e1ecb70a69b9a14e35f577092',\n", + " 'width': 64}],\n", + " 'name': 'Days Of The New',\n", + " 'popularity': 53,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:07jc1IMGtecDZzOL9cP50t'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/3R6c2tWDBeYB1GncjLMn9n'},\n", + " 'followers': {'href': None, 'total': 798161},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'grunge',\n", + " 'nu metal',\n", + " 'pop rock',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/3R6c2tWDBeYB1GncjLMn9n',\n", + " 'id': '3R6c2tWDBeYB1GncjLMn9n',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eba46984eb886ac15bf44ed77f',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174a46984eb886ac15bf44ed77f',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178a46984eb886ac15bf44ed77f',\n", + " 'width': 160}],\n", + " 'name': 'Candlebox',\n", + " 'popularity': 56,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:3R6c2tWDBeYB1GncjLMn9n'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/4iudEcmuPlYNdbP3e1bdn1'},\n", + " 'followers': {'href': None, 'total': 1132232},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'australian alternative rock',\n", + " 'australian psych',\n", + " 'grunge',\n", + " 'nu metal',\n", + " 'pop rock',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/4iudEcmuPlYNdbP3e1bdn1',\n", + " 'id': '4iudEcmuPlYNdbP3e1bdn1',\n", + " 'images': [{'height': 667,\n", + " 'url': 'https://i.scdn.co/image/b362d7cd057ae8affb562483a0c1780172fba9f2',\n", + " 'width': 1000},\n", + " {'height': 427,\n", + " 'url': 'https://i.scdn.co/image/9e2b188b8b813485452b2d58c6655c6af7042b61',\n", + " 'width': 640},\n", + " {'height': 133,\n", + " 'url': 'https://i.scdn.co/image/49f683c5880352ec4e2f8f3f3e231fe8251571c8',\n", + " 'width': 200},\n", + " {'height': 43,\n", + " 'url': 'https://i.scdn.co/image/4b06032b9adde81cd7d86237ac86f3bd713fd7c7',\n", + " 'width': 64}],\n", + " 'name': 'Silverchair',\n", + " 'popularity': 61,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:4iudEcmuPlYNdbP3e1bdn1'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0mXTJETA4XUa12MmmXxZJh'},\n", + " 'followers': {'href': None, 'total': 1481382},\n", + " 'genres': ['acoustic rock', 'permanent wave', 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/0mXTJETA4XUa12MmmXxZJh',\n", + " 'id': '0mXTJETA4XUa12MmmXxZJh',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb98a58862098f8be6496ba9d6',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000517498a58862098f8be6496ba9d6',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f17898a58862098f8be6496ba9d6',\n", + " 'width': 160}],\n", + " 'name': 'Eddie Vedder',\n", + " 'popularity': 64,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0mXTJETA4XUa12MmmXxZJh'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/40Yq4vzPs9VNUrIBG5Jr2i'},\n", + " 'followers': {'href': None, 'total': 4408514},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'grunge',\n", + " 'permanent wave',\n", + " 'pop rock',\n", + " 'rock',\n", + " 'spacegrunge'],\n", + " 'href': 'https://api.spotify.com/v1/artists/40Yq4vzPs9VNUrIBG5Jr2i',\n", + " 'id': '40Yq4vzPs9VNUrIBG5Jr2i',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb1a7d0845c3b7e2f130264957',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051741a7d0845c3b7e2f130264957',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1781a7d0845c3b7e2f130264957',\n", + " 'width': 160}],\n", + " 'name': 'The Smashing Pumpkins',\n", + " 'popularity': 74,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:40Yq4vzPs9VNUrIBG5Jr2i'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/3Ukr3Ufjg8ygRJv7Ww887f'},\n", + " 'followers': {'href': None, 'total': 293817},\n", + " 'genres': ['alternative metal', 'alternative rock', 'grunge', 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/3Ukr3Ufjg8ygRJv7Ww887f',\n", + " 'id': '3Ukr3Ufjg8ygRJv7Ww887f',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb7c8bb5704a37a593587ac2e8',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051747c8bb5704a37a593587ac2e8',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1787c8bb5704a37a593587ac2e8',\n", + " 'width': 160}],\n", + " 'name': 'Screaming Trees',\n", + " 'popularity': 48,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:3Ukr3Ufjg8ygRJv7Ww887f'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/2ziB7fzrXBoh1HUPS6sVFn'},\n", + " 'followers': {'href': None, 'total': 4084730},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'nu metal',\n", + " 'permanent wave',\n", + " 'post-grunge',\n", + " 'rock',\n", + " 'supergroup'],\n", + " 'href': 'https://api.spotify.com/v1/artists/2ziB7fzrXBoh1HUPS6sVFn',\n", + " 'id': '2ziB7fzrXBoh1HUPS6sVFn',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb5a865295befda9e060a72cb0',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051745a865295befda9e060a72cb0',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1785a865295befda9e060a72cb0',\n", + " 'width': 160}],\n", + " 'name': 'Audioslave',\n", + " 'popularity': 70,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:2ziB7fzrXBoh1HUPS6sVFn'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/7jy3rLJdDQY21OgRLCZ9sD'},\n", + " 'followers': {'href': None, 'total': 10771113},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'modern rock',\n", + " 'permanent wave',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/7jy3rLJdDQY21OgRLCZ9sD',\n", + " 'id': '7jy3rLJdDQY21OgRLCZ9sD',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb9a43b87b50cd3d03544bb3e5',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051749a43b87b50cd3d03544bb3e5',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1789a43b87b50cd3d03544bb3e5',\n", + " 'width': 160}],\n", + " 'name': 'Foo Fighters',\n", + " 'popularity': 80,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:7jy3rLJdDQY21OgRLCZ9sD'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/5HUFo8AH9ZILmlyKFfEMNP'},\n", + " 'followers': {'href': None, 'total': 266759},\n", + " 'genres': ['alternative metal', 'alternative rock', 'grunge', 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/5HUFo8AH9ZILmlyKFfEMNP',\n", + " 'id': '5HUFo8AH9ZILmlyKFfEMNP',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb214b058178da996df96b94bc',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174214b058178da996df96b94bc',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178214b058178da996df96b94bc',\n", + " 'width': 160}],\n", + " 'name': 'Jerry Cantrell',\n", + " 'popularity': 46,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:5HUFo8AH9ZILmlyKFfEMNP'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/02da1vDJ2hWqfK7aJL6SJm'},\n", + " 'followers': {'href': None, 'total': 558065},\n", + " 'genres': ['alternative rock',\n", + " 'grunge',\n", + " 'permanent wave',\n", + " 'pop rock',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/02da1vDJ2hWqfK7aJL6SJm',\n", + " 'id': '02da1vDJ2hWqfK7aJL6SJm',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb0a6ab0c900faf7160d02cbe7',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051740a6ab0c900faf7160d02cbe7',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1780a6ab0c900faf7160d02cbe7',\n", + " 'width': 160}],\n", + " 'name': 'Soul Asylum',\n", + " 'popularity': 57,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:02da1vDJ2hWqfK7aJL6SJm'}]}" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "res_01_dict = res_01.json()\n", + "res_01_dict" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "a0c30b00", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "dict_keys(['artists'])" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "res_01_dict.keys()" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "add9badb", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "20" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(res_01_dict['artists'])" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "48dae914", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'external_urls': {'spotify': 'https://open.spotify.com/artist/0T7JQxpy1Li93vLNirbv0Z'},\n", + " 'followers': {'href': None, 'total': 540790},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'blues rock',\n", + " 'grunge',\n", + " 'rock',\n", + " 'supergroup'],\n", + " 'href': 'https://api.spotify.com/v1/artists/0T7JQxpy1Li93vLNirbv0Z',\n", + " 'id': '0T7JQxpy1Li93vLNirbv0Z',\n", + " 'images': [{'height': 128,\n", + " 'url': 'https://i.scdn.co/image/1e30ffa1b0abce432e9598f2f7746fe65ac22b9c',\n", + " 'width': 198},\n", + " {'height': 41,\n", + " 'url': 'https://i.scdn.co/image/b3367400bcc21b641d606125205aceecf596ac16',\n", + " 'width': 64}],\n", + " 'name': 'Mad Season',\n", + " 'popularity': 52,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0T7JQxpy1Li93vLNirbv0Z'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/2UazAtjfzqBF0Nho2awK4z'},\n", + " 'followers': {'href': None, 'total': 3158714},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'grunge',\n", + " 'hard rock',\n", + " 'nu metal',\n", + " 'pop rock',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/2UazAtjfzqBF0Nho2awK4z',\n", + " 'id': '2UazAtjfzqBF0Nho2awK4z',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb4bb64f87db255d76538b905f',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051744bb64f87db255d76538b905f',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1784bb64f87db255d76538b905f',\n", + " 'width': 160}],\n", + " 'name': 'Stone Temple Pilots',\n", + " 'popularity': 69,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:2UazAtjfzqBF0Nho2awK4z'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0iHb0mCbqZTYeb4y9Pirrd'},\n", + " 'followers': {'href': None, 'total': 1130409},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'grunge',\n", + " 'hard rock',\n", + " 'pop rock',\n", + " 'rock',\n", + " 'supergroup'],\n", + " 'href': 'https://api.spotify.com/v1/artists/0iHb0mCbqZTYeb4y9Pirrd',\n", + " 'id': '0iHb0mCbqZTYeb4y9Pirrd',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebf47df3543858204550cc19d3',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174f47df3543858204550cc19d3',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178f47df3543858204550cc19d3',\n", + " 'width': 160}],\n", + " 'name': 'Temple Of The Dog',\n", + " 'popularity': 57,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0iHb0mCbqZTYeb4y9Pirrd'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/5xUf6j4upBrXZPg6AI4MRK'},\n", + " 'followers': {'href': None, 'total': 3913504},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'classic rock',\n", + " 'grunge',\n", + " 'hard rock',\n", + " 'nu metal',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/5xUf6j4upBrXZPg6AI4MRK',\n", + " 'id': '5xUf6j4upBrXZPg6AI4MRK',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebafa254b2a224584485286526',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174afa254b2a224584485286526',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178afa254b2a224584485286526',\n", + " 'width': 160}],\n", + " 'name': 'Soundgarden',\n", + " 'popularity': 69,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:5xUf6j4upBrXZPg6AI4MRK'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/64tNsm6TnZe2zpcMVMOoHL'},\n", + " 'followers': {'href': None, 'total': 4435210},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'grunge',\n", + " 'hard rock',\n", + " 'nu metal',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/64tNsm6TnZe2zpcMVMOoHL',\n", + " 'id': '64tNsm6TnZe2zpcMVMOoHL',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb6114a63659d0d5c0a801f733',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051746114a63659d0d5c0a801f733',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1786114a63659d0d5c0a801f733',\n", + " 'width': 160}],\n", + " 'name': 'Alice In Chains',\n", + " 'popularity': 73,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:64tNsm6TnZe2zpcMVMOoHL'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/78SHxLdtysAXgywQ4vE0Oa'},\n", + " 'followers': {'href': None, 'total': 1698236},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'grunge',\n", + " 'nu metal',\n", + " 'pop rock',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/78SHxLdtysAXgywQ4vE0Oa',\n", + " 'id': '78SHxLdtysAXgywQ4vE0Oa',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebd209395dc5321f4b5163aed4',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174d209395dc5321f4b5163aed4',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178d209395dc5321f4b5163aed4',\n", + " 'width': 160}],\n", + " 'name': 'Bush',\n", + " 'popularity': 63,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:78SHxLdtysAXgywQ4vE0Oa'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/5sD1ZLf2dGQ9gQ3YJl1eAd'},\n", + " 'followers': {'href': None, 'total': 1091661},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'blues rock',\n", + " 'grunge',\n", + " 'pop rock',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/5sD1ZLf2dGQ9gQ3YJl1eAd',\n", + " 'id': '5sD1ZLf2dGQ9gQ3YJl1eAd',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebdcc3fe6af94c5c178a36d006',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174dcc3fe6af94c5c178a36d006',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178dcc3fe6af94c5c178a36d006',\n", + " 'width': 160}],\n", + " 'name': 'Blind Melon',\n", + " 'popularity': 63,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:5sD1ZLf2dGQ9gQ3YJl1eAd'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0XHiH53dHrvbwfjYM7en7I'},\n", + " 'followers': {'href': None, 'total': 1961351},\n", + " 'genres': ['alternative metal', 'alternative rock', 'grunge', 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/0XHiH53dHrvbwfjYM7en7I',\n", + " 'id': '0XHiH53dHrvbwfjYM7en7I',\n", + " 'images': [{'height': 1000,\n", + " 'url': 'https://i.scdn.co/image/85eb1c9e95d3b74bd7304e8b89d7c48601f07845',\n", + " 'width': 1000},\n", + " {'height': 640,\n", + " 'url': 'https://i.scdn.co/image/01febd15ceb41784674011a449e41e3725e0455f',\n", + " 'width': 640},\n", + " {'height': 200,\n", + " 'url': 'https://i.scdn.co/image/f74e645827ff0bd0dfaae16f9a77eea34158ec9f',\n", + " 'width': 200},\n", + " {'height': 64,\n", + " 'url': 'https://i.scdn.co/image/deaf1957024c5fbc09d40068b89197d637e11e69',\n", + " 'width': 64}],\n", + " 'name': 'Chris Cornell',\n", + " 'popularity': 62,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0XHiH53dHrvbwfjYM7en7I'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/02NfyD6AlLA12crYzw5YcR'},\n", + " 'followers': {'href': None, 'total': 1292772},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'blues rock',\n", + " 'funk metal',\n", + " 'funk rock',\n", + " 'grunge',\n", + " 'nu metal',\n", + " 'permanent wave',\n", + " 'pop rock',\n", + " 'rap rock',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/02NfyD6AlLA12crYzw5YcR',\n", + " 'id': '02NfyD6AlLA12crYzw5YcR',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb6181668c9b31f2505039ba33',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051746181668c9b31f2505039ba33',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1786181668c9b31f2505039ba33',\n", + " 'width': 160}],\n", + " 'name': \"Jane's Addiction\",\n", + " 'popularity': 58,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:02NfyD6AlLA12crYzw5YcR'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/3XR64HmFo4OvexUUNW7TP0'},\n", + " 'followers': {'href': None, 'total': 317160},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'funk metal',\n", + " 'grunge',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/3XR64HmFo4OvexUUNW7TP0',\n", + " 'id': '3XR64HmFo4OvexUUNW7TP0',\n", + " 'images': [{'height': 731,\n", + " 'url': 'https://i.scdn.co/image/ced0e4d64f4915766d0cdf47541297d53c8281ac',\n", + " 'width': 1000},\n", + " {'height': 468,\n", + " 'url': 'https://i.scdn.co/image/f65d3b3b8207331715d76ce7c0c496e98e2d6c7e',\n", + " 'width': 640},\n", + " {'height': 146,\n", + " 'url': 'https://i.scdn.co/image/1f236af9d80d21e63a1337427115923ed69055ab',\n", + " 'width': 200},\n", + " {'height': 47,\n", + " 'url': 'https://i.scdn.co/image/7af1f30406ab8379eab32bf95ef6ae33aea8dcf8',\n", + " 'width': 64}],\n", + " 'name': 'Mother Love Bone',\n", + " 'popularity': 46,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:3XR64HmFo4OvexUUNW7TP0'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/07jc1IMGtecDZzOL9cP50t'},\n", + " 'followers': {'href': None, 'total': 360265},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'grunge',\n", + " 'nu metal',\n", + " 'pop rock',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/07jc1IMGtecDZzOL9cP50t',\n", + " 'id': '07jc1IMGtecDZzOL9cP50t',\n", + " 'images': [{'height': 654,\n", + " 'url': 'https://i.scdn.co/image/97649b63c5520446ad303326e53906876e364e22',\n", + " 'width': 1000},\n", + " {'height': 419,\n", + " 'url': 'https://i.scdn.co/image/343e407da4ae28a78862be292f0384bb5d07192e',\n", + " 'width': 640},\n", + " {'height': 131,\n", + " 'url': 'https://i.scdn.co/image/4ccfedb6f159bd63330be03bead9d96d2f323b00',\n", + " 'width': 200},\n", + " {'height': 42,\n", + " 'url': 'https://i.scdn.co/image/86a17596bd17d19e1ecb70a69b9a14e35f577092',\n", + " 'width': 64}],\n", + " 'name': 'Days Of The New',\n", + " 'popularity': 53,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:07jc1IMGtecDZzOL9cP50t'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/3R6c2tWDBeYB1GncjLMn9n'},\n", + " 'followers': {'href': None, 'total': 798161},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'grunge',\n", + " 'nu metal',\n", + " 'pop rock',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/3R6c2tWDBeYB1GncjLMn9n',\n", + " 'id': '3R6c2tWDBeYB1GncjLMn9n',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eba46984eb886ac15bf44ed77f',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174a46984eb886ac15bf44ed77f',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178a46984eb886ac15bf44ed77f',\n", + " 'width': 160}],\n", + " 'name': 'Candlebox',\n", + " 'popularity': 56,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:3R6c2tWDBeYB1GncjLMn9n'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/4iudEcmuPlYNdbP3e1bdn1'},\n", + " 'followers': {'href': None, 'total': 1132232},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'australian alternative rock',\n", + " 'australian psych',\n", + " 'grunge',\n", + " 'nu metal',\n", + " 'pop rock',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/4iudEcmuPlYNdbP3e1bdn1',\n", + " 'id': '4iudEcmuPlYNdbP3e1bdn1',\n", + " 'images': [{'height': 667,\n", + " 'url': 'https://i.scdn.co/image/b362d7cd057ae8affb562483a0c1780172fba9f2',\n", + " 'width': 1000},\n", + " {'height': 427,\n", + " 'url': 'https://i.scdn.co/image/9e2b188b8b813485452b2d58c6655c6af7042b61',\n", + " 'width': 640},\n", + " {'height': 133,\n", + " 'url': 'https://i.scdn.co/image/49f683c5880352ec4e2f8f3f3e231fe8251571c8',\n", + " 'width': 200},\n", + " {'height': 43,\n", + " 'url': 'https://i.scdn.co/image/4b06032b9adde81cd7d86237ac86f3bd713fd7c7',\n", + " 'width': 64}],\n", + " 'name': 'Silverchair',\n", + " 'popularity': 61,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:4iudEcmuPlYNdbP3e1bdn1'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0mXTJETA4XUa12MmmXxZJh'},\n", + " 'followers': {'href': None, 'total': 1481382},\n", + " 'genres': ['acoustic rock', 'permanent wave', 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/0mXTJETA4XUa12MmmXxZJh',\n", + " 'id': '0mXTJETA4XUa12MmmXxZJh',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb98a58862098f8be6496ba9d6',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000517498a58862098f8be6496ba9d6',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f17898a58862098f8be6496ba9d6',\n", + " 'width': 160}],\n", + " 'name': 'Eddie Vedder',\n", + " 'popularity': 64,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0mXTJETA4XUa12MmmXxZJh'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/40Yq4vzPs9VNUrIBG5Jr2i'},\n", + " 'followers': {'href': None, 'total': 4408514},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'grunge',\n", + " 'permanent wave',\n", + " 'pop rock',\n", + " 'rock',\n", + " 'spacegrunge'],\n", + " 'href': 'https://api.spotify.com/v1/artists/40Yq4vzPs9VNUrIBG5Jr2i',\n", + " 'id': '40Yq4vzPs9VNUrIBG5Jr2i',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb1a7d0845c3b7e2f130264957',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051741a7d0845c3b7e2f130264957',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1781a7d0845c3b7e2f130264957',\n", + " 'width': 160}],\n", + " 'name': 'The Smashing Pumpkins',\n", + " 'popularity': 74,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:40Yq4vzPs9VNUrIBG5Jr2i'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/3Ukr3Ufjg8ygRJv7Ww887f'},\n", + " 'followers': {'href': None, 'total': 293817},\n", + " 'genres': ['alternative metal', 'alternative rock', 'grunge', 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/3Ukr3Ufjg8ygRJv7Ww887f',\n", + " 'id': '3Ukr3Ufjg8ygRJv7Ww887f',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb7c8bb5704a37a593587ac2e8',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051747c8bb5704a37a593587ac2e8',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1787c8bb5704a37a593587ac2e8',\n", + " 'width': 160}],\n", + " 'name': 'Screaming Trees',\n", + " 'popularity': 48,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:3Ukr3Ufjg8ygRJv7Ww887f'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/2ziB7fzrXBoh1HUPS6sVFn'},\n", + " 'followers': {'href': None, 'total': 4084730},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'nu metal',\n", + " 'permanent wave',\n", + " 'post-grunge',\n", + " 'rock',\n", + " 'supergroup'],\n", + " 'href': 'https://api.spotify.com/v1/artists/2ziB7fzrXBoh1HUPS6sVFn',\n", + " 'id': '2ziB7fzrXBoh1HUPS6sVFn',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb5a865295befda9e060a72cb0',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051745a865295befda9e060a72cb0',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1785a865295befda9e060a72cb0',\n", + " 'width': 160}],\n", + " 'name': 'Audioslave',\n", + " 'popularity': 70,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:2ziB7fzrXBoh1HUPS6sVFn'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/7jy3rLJdDQY21OgRLCZ9sD'},\n", + " 'followers': {'href': None, 'total': 10771113},\n", + " 'genres': ['alternative metal',\n", + " 'alternative rock',\n", + " 'modern rock',\n", + " 'permanent wave',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/7jy3rLJdDQY21OgRLCZ9sD',\n", + " 'id': '7jy3rLJdDQY21OgRLCZ9sD',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb9a43b87b50cd3d03544bb3e5',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051749a43b87b50cd3d03544bb3e5',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1789a43b87b50cd3d03544bb3e5',\n", + " 'width': 160}],\n", + " 'name': 'Foo Fighters',\n", + " 'popularity': 80,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:7jy3rLJdDQY21OgRLCZ9sD'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/5HUFo8AH9ZILmlyKFfEMNP'},\n", + " 'followers': {'href': None, 'total': 266759},\n", + " 'genres': ['alternative metal', 'alternative rock', 'grunge', 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/5HUFo8AH9ZILmlyKFfEMNP',\n", + " 'id': '5HUFo8AH9ZILmlyKFfEMNP',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb214b058178da996df96b94bc',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174214b058178da996df96b94bc',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178214b058178da996df96b94bc',\n", + " 'width': 160}],\n", + " 'name': 'Jerry Cantrell',\n", + " 'popularity': 46,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:5HUFo8AH9ZILmlyKFfEMNP'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/02da1vDJ2hWqfK7aJL6SJm'},\n", + " 'followers': {'href': None, 'total': 558065},\n", + " 'genres': ['alternative rock',\n", + " 'grunge',\n", + " 'permanent wave',\n", + " 'pop rock',\n", + " 'post-grunge',\n", + " 'rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/02da1vDJ2hWqfK7aJL6SJm',\n", + " 'id': '02da1vDJ2hWqfK7aJL6SJm',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb0a6ab0c900faf7160d02cbe7',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051740a6ab0c900faf7160d02cbe7',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1780a6ab0c900faf7160d02cbe7',\n", + " 'width': 160}],\n", + " 'name': 'Soul Asylum',\n", + " 'popularity': 57,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:02da1vDJ2hWqfK7aJL6SJm'}]" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "res_01_dict['artists']" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "6bdb9b4a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'Mad Season'" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "res_01_dict['artists'][0]['name']" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "b614b787", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['0T7JQxpy1Li93vLNirbv0Z',\n", + " '2UazAtjfzqBF0Nho2awK4z',\n", + " '0iHb0mCbqZTYeb4y9Pirrd',\n", + " '5xUf6j4upBrXZPg6AI4MRK',\n", + " '64tNsm6TnZe2zpcMVMOoHL',\n", + " '78SHxLdtysAXgywQ4vE0Oa',\n", + " '5sD1ZLf2dGQ9gQ3YJl1eAd',\n", + " '0XHiH53dHrvbwfjYM7en7I',\n", + " '02NfyD6AlLA12crYzw5YcR',\n", + " '3XR64HmFo4OvexUUNW7TP0',\n", + " '07jc1IMGtecDZzOL9cP50t',\n", + " '3R6c2tWDBeYB1GncjLMn9n',\n", + " '4iudEcmuPlYNdbP3e1bdn1',\n", + " '0mXTJETA4XUa12MmmXxZJh',\n", + " '40Yq4vzPs9VNUrIBG5Jr2i',\n", + " '3Ukr3Ufjg8ygRJv7Ww887f',\n", + " '2ziB7fzrXBoh1HUPS6sVFn',\n", + " '7jy3rLJdDQY21OgRLCZ9sD',\n", + " '5HUFo8AH9ZILmlyKFfEMNP',\n", + " '02da1vDJ2hWqfK7aJL6SJm']" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "artists_list = [res_01_dict['artists'][artista]['id'] for artista in range(len(res_01_dict['artists']))]\n", + "artists_list" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "6a7d5744", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "https://api.spotify.com/v1/artists/1w5Kfo2jwwIPruYS2UWh56/top-tracks?country=ES\n" + ] + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "full_endpoint_02 = full_endpoint + method_02 + country\n", + "print(full_endpoint_02)\n", + "\n", + "res_02 = requests.get(full_endpoint_02, headers=header_info)\n", + "res_02" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "3314d938", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "https://api.spotify.com/v1/artists/{}/top-tracks?country=ES\n", + "['River of Deceit', \"I Don't Know Anything\", 'Wake Up', \"I'm Above\", 'Long Gone Day', 'Lifeless Dead', 'Slip Away', 'All Alone', 'X-Ray Mind', 'Artificial Red']\n", + "['Interstate Love Song - 2019 Remaster', 'Plush', 'Creep', 'Plush - Acoustic', 'Sex Type Thing - 2017 Remaster', 'Vasoline - 2019 Remaster', \"Trippin' on a Hole in a Paper Heart\", 'Big Empty - 2019 Remaster', 'Dead & Bloated', 'Wicked Garden - 2017 Remaster']\n", + "['Hunger Strike', 'Hunger Strike - 25th Anniversary Mix', 'Say Hello 2 Heaven', 'Call Me A Dog', 'Say Hello 2 Heaven - 25th Anniversary Mix', \"Pushin' Forward Back\", 'Times Of Trouble', 'All Night Thing', 'Wooden Jesus', 'Four Walled World']\n", + "['Black Hole Sun', 'Fell On Black Days', 'Spoonman', 'Outshined - Remastered', 'Rusty Cage - Remastered', 'Burden In My Hand', 'The Day I Tried To Live', 'Pretty Noose', 'Blow Up The Outside World', 'Hunted Down']\n", + "['Would? (2022 Remaster)', 'Man in the Box', 'Nutshell', 'Rooster (2022 Remaster)', 'Them Bones (2022 Remaster)', 'Down In A Hole (2022 Remaster)', 'We Die Young', 'No Excuses', 'I Stay Away', 'Heaven Beside You']\n", + "['Glycerine - Remastered', 'Machinehead - Remastered', 'Comedown - Remastered', 'Swallowed - Remastered', 'Everything Zen - Remastered', 'The Chemicals Between Us - Remastered', 'More Than Machines', 'Little Things - Remastered', 'Glycerine - Live Acoustic', 'Flowers On A Grave']\n", + "['No Rain', 'Change', 'Toes Across The Floor', 'Tones Of Home', 'The Pusher', 'Skinned', 'Soul One', 'Galaxie - 2002 Digital Remaster / 24 Bit Mastering', 'Mouthful Of Cavities', 'Galaxie / Hello, Goodbye']\n", + "['You Know My Name - From \"Casino Royale\" Soundtrack', 'Patience', 'Nothing Compares 2 U - Live At SiriusXM/2015', 'Nearly Forgot My Broken Heart', 'Seasons', 'Black Hole Sun - Recorded Live At Red Robinson Show Theatre, Vancouver, Canada on April 30, 2011', 'Billie Jean', 'Like A Stone - Recorded Live At Queen Elizabeth Theatre, Toronto, ON on April 20, 2011', 'Thank You - Recorded Live At Esplanade Arts & Heritage Centre, Medicine Hat, Alberta, Canada on April 27, 2011', \"Can't Change Me\"]\n", + "['Jane Says', 'Been Caught Stealing', 'Just Because', 'Mountain Song', 'Stop', 'Irresistible Force', 'True Nature', 'Summertime Rolls', 'Ocean Size', 'Up the Beach']\n", + "['Crown Of Thorns', 'This Is Shangrila', 'Chloe Dancer/Crown Of Thorns', 'Gentle Groove', 'Chloe Dancer - Demo', 'Stargazer', 'Stardog Champion', 'Bone China', 'Man Of Golden Words', 'Holy Roller']\n", + "['Touch, Peel And Stand', 'Shelf In The Room', 'The Down Town', 'Die Born', 'Weapon & The Wound', 'Dirty Road', 'Enemy', 'Face Of The Earth', \"What's Left For Me?\", 'Where I Stand']\n", + "['Far Behind', 'You', 'Cover Me', 'Change', '10,000 Horses', \"Don't You\", 'Blossom', 'Simple Lessons', 'You', 'Rain']\n", + "['Tomorrow', 'Miss You Love', 'Freak', 'Straight Lines', \"Ana's Song (Open Fire)\", 'Tomorrow', 'Suicidal Dream', \"Israel's Son\", 'Anthem for the Year 2000', 'Shade']\n", + "['Society', 'Hard Sun', 'Guaranteed', 'Long Nights', 'No Ceiling', 'Rise', \"My Father's Daughter\", 'Toulumne', 'Photographs', 'Setting Forth']\n", + "['1979 - Remastered 2012', 'Bullet With Butterfly Wings - Remastered 2012', 'Disarm - 2011 Remaster', 'Zero - Remastered 2012', 'Today - 2011 Remaster', 'Tonight, Tonight - Remastered 2012', 'Cherub Rock - 2011 Remaster', 'Today', 'Mayonaise - 2011 Remaster', 'Luna - 2011 Remaster']\n", + "['Nearly Lost You', 'Shadow of the Season', 'More or Less', 'All I Know', 'Dollar Bill', 'Bed Of Roses', 'Butterfly', 'Troubled Times', 'Dying Days', 'Winter Song']\n", + "['Like a Stone', 'Show Me How to Live', 'Be Yourself', 'Cochise', 'I Am the Highway', \"Doesn't Remind Me\", 'Gasoline', 'Shadow on the Sun', 'Sound Of A Gun', 'What You Are']\n", + "['Everlong', 'The Pretender', 'Learn to Fly', 'Best of You', 'My Hero', 'All My Life', 'Times Like These', 'Monkey Wrench', 'Walk', 'Everlong - Acoustic Version']\n", + "['Cut You In', 'My Song', 'Angel Eyes', 'Psychotic Break', 'Dickeye', 'Atone', 'Brighten', 'Anger Rising', 'Siren Song', 'Setting Sun']\n", + "['Runaway Train (2022 Remaster)', 'Somebody to Shove (2022 Remaster)', 'Misery', 'Black Gold (2022 Remaster)', 'Runaway Train - Live at Grand Forks Airbase, Grand Forks, ND - June 1997', 'I Can See Clearly Now - Live at Grand Forks Airbase, Grand Forks, ND - June 1997', 'Sexual Healing - Live at Grand Forks Airbase, Grand Forks, ND - June 1997', 'Without a Trace (2022 Remaster)', 'Promises Broken', 'Just Like Anyone']\n" + ] + } + ], + "source": [ + "full_endpoint_03 = base_url + resource + '{}' + method_02 + country\n", + "print(full_endpoint_03)\n", + "\n", + "for artist in artists_list:\n", + " response = requests.get(full_endpoint_03.format(artist), headers=header_info)\n", + " print([response.json()['tracks'][track]['name'] for track in range(len(response.json()['tracks']))])" + ] + }, + { + "cell_type": "markdown", + "id": "98827be6", + "metadata": {}, + "source": [ + "---\n", + "\n", + "### Bonus track!!!\n", + "\n", + "You can publish your own Playlist with [`/playlists`](https://developer.spotify.com/documentation/web-api/reference/#/operations/create-playlist) and [`/tracks`](https://developer.spotify.com/documentation/web-api/reference/#/operations/add-tracks-to-playlist).\n", + "\n", + "![I quit](https://media.giphy.com/media/gui67fZ3xIneM/giphy.gif)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2e5f0905", + "metadata": {}, + "outputs": [], + "source": [ + "# Bonus\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "37af4094", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "id": "9436b623", + "metadata": {}, + "source": [ + "---" + ] + }, + { + "cell_type": "markdown", + "id": "a9487ef7", + "metadata": {}, + "source": [ + "You can always try with the [wrapper](https://github.com/plamere/spotipy)!!!\n", + "\n", + "![I quit](https://media.giphy.com/media/3oFzlXPvXYZ4q8VQOs/giphy.gif)" + ] + }, + { + "cell_type": "markdown", + "id": "0a399ce8", + "metadata": {}, + "source": [ + "---" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python [conda env:m1_env]", + "language": "python", + "name": "conda-env-m1_env-py" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/notebooks/spotify_rest_api_challenge_version_lourdes(not_finished).ipynb b/notebooks/spotify_rest_api_challenge_version_lourdes(not_finished).ipynb new file mode 100644 index 0000000..0e1a936 --- /dev/null +++ b/notebooks/spotify_rest_api_challenge_version_lourdes(not_finished).ipynb @@ -0,0 +1,1220 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "ef05c1d6", + "metadata": {}, + "source": [ + "![spotify_logo](../img/spotify_logo.png)\n", + "\n", + "# Spotify REST API Challenge\n", + "\n", + "__What to listen?__\n", + "\n", + "Create your own playlist based on the related artists and their most popular tracks using the [Spotify REST API](https://developer.spotify.com/)" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "17a49776", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import numpy as np\n", + "import requests" + ] + }, + { + "cell_type": "markdown", + "id": "4e97884c", + "metadata": {}, + "source": [ + "### Get access!!!\n", + "\n", + "Get your `client_id` and `client_secret` to generate your __token__ access" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "7b5d2e52", + "metadata": {}, + "outputs": [], + "source": [ + "# Generate token with a POST request\n", + "\n", + "client_id = 'e858f767f96c426dbb8fa826f342ea91'\n", + "client_secret = 'e15411449d3f442cb508ceca66d9840c'\n", + "auth_url = 'https://accounts.spotify.com/api/token'" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "c7901d1e", + "metadata": {}, + "outputs": [], + "source": [ + "auth_response = requests.post(auth_url, {'grant_type': 'client_credentials',\n", + " 'client_id': client_id,\n", + " 'client_secret': client_secret}).json()" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "262e7e18", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'access_token': 'BQD57gr9X6jXJ8gMe5OzQbHlDLW3PUf_d0pcjGrZUYbgPwm9NQqVCPn0tpT56t8i2Mf9i4gfseCNoltbRgvr828DkgMzgu6t6eq2ctJc1g-hypdNecrZ',\n", + " 'token_type': 'Bearer',\n", + " 'expires_in': 3600}" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "access_token = auth_response['access_token']\n", + "auth_response" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "a0cdbe88", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'BQD57gr9X6jXJ8gMe5OzQbHlDLW3PUf_d0pcjGrZUYbgPwm9NQqVCPn0tpT56t8i2Mf9i4gfseCNoltbRgvr828DkgMzgu6t6eq2ctJc1g-hypdNecrZ'" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "access_token" + ] + }, + { + "cell_type": "markdown", + "id": "e617caff", + "metadata": {}, + "source": [ + "### Set your main variables!!!\n", + "\n", + "Set the `base_uri` (i.e.: end-point), parameters and `headers` for your __GET__ operations" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "62e6d4fb", + "metadata": {}, + "outputs": [], + "source": [ + "# Base end-point construction\n", + "\n", + "base_url = 'https://api.spotify.com/v1/'\n", + "resource = 'artists/'\n", + "\n", + "header_info = {'Authorization': 'Bearer {token}'.format(token=access_token)}" + ] + }, + { + "cell_type": "markdown", + "id": "16660a9b", + "metadata": {}, + "source": [ + "### Create your new playlist!!!\n", + "\n", + "Use [`/related-artists`](https://developer.spotify.com/documentation/web-api/reference/#/operations/get-an-artists-related-artists) and [`/top-tracks`](https://developer.spotify.com/documentation/web-api/reference/#/operations/get-an-artists-top-tracks) in order to get the data that you need.\n", + "\n", + "__Here you have the different artists to start with:__\n", + "\n", + "- __Option 1:__ 0L8ExT028jH3ddEcZwqJJ5\n", + "\n", + "- __Option 2:__ 4Y7tXHSEejGu1vQ9bwDdXW\n", + "\n", + "- __Option 3:__ 6FBDaR13swtiWwGhX1WQsP\n", + "\n", + "- __Option 4:__ 0kyQwKHCZnKE7kTXkxXjrB\n", + "\n", + "- __Option 5:__ 2d0hyoQ5ynDBnkvAbJKORj\n", + "\n", + "- __Option 6:__ 3bgsNtcf5d5h9jbQbohfBK\n", + "\n", + "- __Option 7:__ 7mWCSSOYqm4E9mB7V4ot6S\n", + "\n", + "- __Option 8:__ 64KEffDW9EtZ1y2vBYgq8T\n", + "\n", + "- __Option 9:__ 4k1ELeJKT1ISyDv8JivPpB\n", + "\n", + "- __Option 10:__ 4Z8W4fKeB5YxbusRsdQVPb\n", + "\n", + "- __Option 11:__ 26dSoYclwsYLMAKD3tpOr4\n", + "\n", + "- __Option 12:__ 7y97mc3bZRFXzT2szRM4L4\n", + "\n", + "- __Option 13:__ 1w5Kfo2jwwIPruYS2UWh56\n", + "\n", + "\n", + "> Remember to check the [Requests](https://requests.readthedocs.io/en/latest/) library docs!!!\n", + "\n", + "---" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "id": "04f85940", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB/related-artists\n" + ] + }, + { + "data": { + "text/plain": [ + "{'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0gt2Xy6uSRTFTWYrHOHx82'},\n", + " 'followers': {'href': None, 'total': 22577},\n", + " 'genres': ['venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/0gt2Xy6uSRTFTWYrHOHx82',\n", + " 'id': '0gt2Xy6uSRTFTWYrHOHx82',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebcc1ba8f81e2482e1fedc9a24',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174cc1ba8f81e2482e1fedc9a24',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178cc1ba8f81e2482e1fedc9a24',\n", + " 'width': 160}],\n", + " 'name': 'Los Mentas',\n", + " 'popularity': 22,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0gt2Xy6uSRTFTWYrHOHx82'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/7nx8DlJ8j0sUGBvFtpoEwz'},\n", + " 'followers': {'href': None, 'total': 37941},\n", + " 'genres': ['latin rock', 'rock gotico', 'venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/7nx8DlJ8j0sUGBvFtpoEwz',\n", + " 'id': '7nx8DlJ8j0sUGBvFtpoEwz',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb0eabcda0a565599e11ad1160',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051740eabcda0a565599e11ad1160',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1780eabcda0a565599e11ad1160',\n", + " 'width': 160}],\n", + " 'name': 'Sentimiento Muerto',\n", + " 'popularity': 28,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:7nx8DlJ8j0sUGBvFtpoEwz'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/38Wv3iDJm7vyk4OvaHWZxx'},\n", + " 'followers': {'href': None, 'total': 61086},\n", + " 'genres': ['venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/38Wv3iDJm7vyk4OvaHWZxx',\n", + " 'id': '38Wv3iDJm7vyk4OvaHWZxx',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb272c47d395c7b3ecb1bf9e55',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174272c47d395c7b3ecb1bf9e55',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178272c47d395c7b3ecb1bf9e55',\n", + " 'width': 160}],\n", + " 'name': 'Zapato3',\n", + " 'popularity': 35,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:38Wv3iDJm7vyk4OvaHWZxx'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0WmmhplJiEohqKsYoRLsbq'},\n", + " 'followers': {'href': None, 'total': 27222},\n", + " 'genres': ['reggae en espanol', 'venezuelan hip hop', 'venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/0WmmhplJiEohqKsYoRLsbq',\n", + " 'id': '0WmmhplJiEohqKsYoRLsbq',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb9877593d432b8443b98ac093',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051749877593d432b8443b98ac093',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1789877593d432b8443b98ac093',\n", + " 'width': 160}],\n", + " 'name': 'PapaShanty SaundSystem',\n", + " 'popularity': 28,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0WmmhplJiEohqKsYoRLsbq'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/5gs7iemsrjIJbz0ryFcy79'},\n", + " 'followers': {'href': None, 'total': 87237},\n", + " 'genres': ['caracas indie', 'venezuelan indie', 'venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/5gs7iemsrjIJbz0ryFcy79',\n", + " 'id': '5gs7iemsrjIJbz0ryFcy79',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb74b1f8e7b52dc8f6970d36de',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000517474b1f8e7b52dc8f6970d36de',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f17874b1f8e7b52dc8f6970d36de',\n", + " 'width': 160}],\n", + " 'name': 'La Vida Bohème',\n", + " 'popularity': 49,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:5gs7iemsrjIJbz0ryFcy79'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/5nZlhgO7iNedGlO0gKu9us'},\n", + " 'followers': {'href': None, 'total': 89735},\n", + " 'genres': ['latin alternative'],\n", + " 'href': 'https://api.spotify.com/v1/artists/5nZlhgO7iNedGlO0gKu9us',\n", + " 'id': '5nZlhgO7iNedGlO0gKu9us',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebd915aa801b9c654b6b1ffd44',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174d915aa801b9c654b6b1ffd44',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178d915aa801b9c654b6b1ffd44',\n", + " 'width': 160}],\n", + " 'name': 'King Chango',\n", + " 'popularity': 47,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:5nZlhgO7iNedGlO0gKu9us'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/1QMbA3ArY9T5j7YXqFAhWt'},\n", + " 'followers': {'href': None, 'total': 32508},\n", + " 'genres': ['venezuelan indie', 'venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/1QMbA3ArY9T5j7YXqFAhWt',\n", + " 'id': '1QMbA3ArY9T5j7YXqFAhWt',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb8293d3191035183b78ad1eb7',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051748293d3191035183b78ad1eb7',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1788293d3191035183b78ad1eb7',\n", + " 'width': 160}],\n", + " 'name': 'Charliepapa',\n", + " 'popularity': 32,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:1QMbA3ArY9T5j7YXqFAhWt'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/34OLInsXImlQpjzmQw9Wd3'},\n", + " 'followers': {'href': None, 'total': 341239},\n", + " 'genres': ['venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/34OLInsXImlQpjzmQw9Wd3',\n", + " 'id': '34OLInsXImlQpjzmQw9Wd3',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebd03c194a3c3ca6d3adcc53a5',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174d03c194a3c3ca6d3adcc53a5',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178d03c194a3c3ca6d3adcc53a5',\n", + " 'width': 160}],\n", + " 'name': 'Caramelos De Cianuro',\n", + " 'popularity': 57,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:34OLInsXImlQpjzmQw9Wd3'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/2TPLqqQ9arRHA6Xt7gvZTZ'},\n", + " 'followers': {'href': None, 'total': 22345},\n", + " 'genres': ['caracas indie', 'venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/2TPLqqQ9arRHA6Xt7gvZTZ',\n", + " 'id': '2TPLqqQ9arRHA6Xt7gvZTZ',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebe7789b2e5767618214b50695',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174e7789b2e5767618214b50695',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178e7789b2e5767618214b50695',\n", + " 'width': 160}],\n", + " 'name': 'Candy66',\n", + " 'popularity': 25,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:2TPLqqQ9arRHA6Xt7gvZTZ'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/5rTdxb1YVVZMXscz4wexGu'},\n", + " 'followers': {'href': None, 'total': 42813},\n", + " 'genres': ['venezuelan hip hop', 'venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/5rTdxb1YVVZMXscz4wexGu',\n", + " 'id': '5rTdxb1YVVZMXscz4wexGu',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebaba91b76088ffd8ba0ef89b8',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174aba91b76088ffd8ba0ef89b8',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178aba91b76088ffd8ba0ef89b8',\n", + " 'width': 160}],\n", + " 'name': '3 Dueños',\n", + " 'popularity': 33,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:5rTdxb1YVVZMXscz4wexGu'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/2zwh4WnVBGZcfnllC7DUxt'},\n", + " 'followers': {'href': None, 'total': 63120},\n", + " 'genres': ['caracas indie', 'rock en espanol', 'venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/2zwh4WnVBGZcfnllC7DUxt',\n", + " 'id': '2zwh4WnVBGZcfnllC7DUxt',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eba4323b4ce8005e29ff0c14d1',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174a4323b4ce8005e29ff0c14d1',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178a4323b4ce8005e29ff0c14d1',\n", + " 'width': 160}],\n", + " 'name': 'Viniloversus',\n", + " 'popularity': 41,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:2zwh4WnVBGZcfnllC7DUxt'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0OluGbRuQQEcYyttGww517'},\n", + " 'followers': {'href': None, 'total': 180363},\n", + " 'genres': ['latin rock',\n", + " 'mexican indie',\n", + " 'venezuelan indie',\n", + " 'venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/0OluGbRuQQEcYyttGww517',\n", + " 'id': '0OluGbRuQQEcYyttGww517',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb591373b29311cff204f7b312',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174591373b29311cff204f7b312',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178591373b29311cff204f7b312',\n", + " 'width': 160}],\n", + " 'name': 'Los Mesoneros',\n", + " 'popularity': 54,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0OluGbRuQQEcYyttGww517'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/2AbQwU2cuEGfD465wCXlg2'},\n", + " 'followers': {'href': None, 'total': 452907},\n", + " 'genres': ['reggae en espanol', 'venezuelan hip hop', 'venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/2AbQwU2cuEGfD465wCXlg2',\n", + " 'id': '2AbQwU2cuEGfD465wCXlg2',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebe13ab971acbfc3652a201c33',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174e13ab971acbfc3652a201c33',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178e13ab971acbfc3652a201c33',\n", + " 'width': 160}],\n", + " 'name': 'Rawayana',\n", + " 'popularity': 62,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:2AbQwU2cuEGfD465wCXlg2'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/6xPMZgR2peupwU41WF9qi7'},\n", + " 'followers': {'href': None, 'total': 36763},\n", + " 'genres': ['pop reggaeton', 'venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/6xPMZgR2peupwU41WF9qi7',\n", + " 'id': '6xPMZgR2peupwU41WF9qi7',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5ebbe265e982c8a304bca29e626',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174be265e982c8a304bca29e626',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178be265e982c8a304bca29e626',\n", + " 'width': 160}],\n", + " 'name': 'Malanga',\n", + " 'popularity': 36,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:6xPMZgR2peupwU41WF9qi7'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/601e30gtHzQJEPnxcQDwKk'},\n", + " 'followers': {'href': None, 'total': 9471},\n", + " 'genres': ['venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/601e30gtHzQJEPnxcQDwKk',\n", + " 'id': '601e30gtHzQJEPnxcQDwKk',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb15a535f35ba9d541597e3e70',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000517415a535f35ba9d541597e3e70',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f17815a535f35ba9d541597e3e70',\n", + " 'width': 160}],\n", + " 'name': 'Bacalao Men',\n", + " 'popularity': 24,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:601e30gtHzQJEPnxcQDwKk'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/5v3TYN6Mmi5vxV2uSOfXot'},\n", + " 'followers': {'href': None, 'total': 272026},\n", + " 'genres': ['classic venezuelan pop',\n", + " 'gaita zuliana',\n", + " 'pop reggaeton',\n", + " 'salsa venezolana',\n", + " 'tropical'],\n", + " 'href': 'https://api.spotify.com/v1/artists/5v3TYN6Mmi5vxV2uSOfXot',\n", + " 'id': '5v3TYN6Mmi5vxV2uSOfXot',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb389562e93bcd4582535ae51e',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab67616100005174389562e93bcd4582535ae51e',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f178389562e93bcd4582535ae51e',\n", + " 'width': 160}],\n", + " 'name': 'Guaco',\n", + " 'popularity': 53,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:5v3TYN6Mmi5vxV2uSOfXot'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0XHiwpimzCx4fWUdtniRC7'},\n", + " 'followers': {'href': None, 'total': 18286},\n", + " 'genres': ['venezuelan indie', 'venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/0XHiwpimzCx4fWUdtniRC7',\n", + " 'id': '0XHiwpimzCx4fWUdtniRC7',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb5887ef1f2be104fd52e9d3d6',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab676161000051745887ef1f2be104fd52e9d3d6',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f1785887ef1f2be104fd52e9d3d6',\n", + " 'width': 160}],\n", + " 'name': 'Famasloop',\n", + " 'popularity': 24,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0XHiwpimzCx4fWUdtniRC7'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/2gnuMMiUlRWdlMZ37kNfun'},\n", + " 'followers': {'href': None, 'total': 10611},\n", + " 'genres': ['caracas indie', 'venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/2gnuMMiUlRWdlMZ37kNfun',\n", + " 'id': '2gnuMMiUlRWdlMZ37kNfun',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000e5eb87cbcc9534ace656f949a472',\n", + " 'width': 640},\n", + " {'height': 320,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000517487cbcc9534ace656f949a472',\n", + " 'width': 320},\n", + " {'height': 160,\n", + " 'url': 'https://i.scdn.co/image/ab6761610000f17887cbcc9534ace656f949a472',\n", + " 'width': 160}],\n", + " 'name': 'Masseratti 2Lts',\n", + " 'popularity': 18,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:2gnuMMiUlRWdlMZ37kNfun'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/48NeXVOrqMUIRc4M8g0lnZ'},\n", + " 'followers': {'href': None, 'total': 32772},\n", + " 'genres': ['classic venezuelan pop', 'venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/48NeXVOrqMUIRc4M8g0lnZ',\n", + " 'id': '48NeXVOrqMUIRc4M8g0lnZ',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273ece78d66f04c9d05a7901371',\n", + " 'width': 640},\n", + " {'height': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02ece78d66f04c9d05a7901371',\n", + " 'width': 300},\n", + " {'height': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851ece78d66f04c9d05a7901371',\n", + " 'width': 64}],\n", + " 'name': 'Aditus',\n", + " 'popularity': 28,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:48NeXVOrqMUIRc4M8g0lnZ'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/5qwhMBDARccr2smADwgOIE'},\n", + " 'followers': {'href': None, 'total': 1553},\n", + " 'genres': ['venezuelan rock'],\n", + " 'href': 'https://api.spotify.com/v1/artists/5qwhMBDARccr2smADwgOIE',\n", + " 'id': '5qwhMBDARccr2smADwgOIE',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b2730bf47695c9d973b85b58af8d',\n", + " 'width': 640},\n", + " {'height': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e020bf47695c9d973b85b58af8d',\n", + " 'width': 300},\n", + " {'height': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d000048510bf47695c9d973b85b58af8d',\n", + " 'width': 64}],\n", + " 'name': 'Tumbador',\n", + " 'popularity': 10,\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:5qwhMBDARccr2smADwgOIE'}]}" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Here you can complete your endpoint URI\n", + "id_artist = '0kyQwKHCZnKE7kTXkxXjrB'\n", + "related_artists = '/related-artists'\n", + "my_related_artist_list = requests.get((base_url + resource + id_artist + related_artists) , headers = header_info).json()\n", + "print(base_url + resource + id_artist + related_artists)\n", + "my_related_artist_list" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4c338d6f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "857386e2", + "metadata": {}, + "outputs": [], + "source": [ + "#my_related_artist_list.keys()\n", + "#print(my_related_artist_list['artists'])\n", + "\n", + "\n", + "my_dict_artists = []\n", + "for i in my_related_artist_list:\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "779f11ff", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB/top-tracks?country=es\n" + ] + }, + { + "data": { + "text/plain": [ + "{'tracks': [{'album': {'album_group': 'album',\n", + " 'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/5LIVxzLRdrJowxmLayI3uc'},\n", + " 'href': 'https://api.spotify.com/v1/albums/5LIVxzLRdrJowxmLayI3uc',\n", + " 'id': '5LIVxzLRdrJowxmLayI3uc',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273cc4fe4fda4dd75b123f64b20',\n", + " 'width': 640},\n", + " {'height': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02cc4fe4fda4dd75b123f64b20',\n", + " 'width': 300},\n", + " {'height': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851cc4fe4fda4dd75b123f64b20',\n", + " 'width': 64}],\n", + " 'is_playable': True,\n", + " 'name': 'Plomo Revienta',\n", + " 'release_date': '1997',\n", + " 'release_date_precision': 'year',\n", + " 'total_tracks': 17,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:5LIVxzLRdrJowxmLayI3uc'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 252280,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'VES019700043'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/6F7uqfzvcdl5Y42mJBVc9V'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/6F7uqfzvcdl5Y42mJBVc9V',\n", + " 'id': '6F7uqfzvcdl5Y42mJBVc9V',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Allá Cayó',\n", + " 'popularity': 40,\n", + " 'preview_url': 'https://p.scdn.co/mp3-preview/b43bea099c98ccfb17c655f9b3d50d0a00e27c68?cid=e858f767f96c426dbb8fa826f342ea91',\n", + " 'track_number': 2,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:6F7uqfzvcdl5Y42mJBVc9V'},\n", + " {'album': {'album_group': 'album',\n", + " 'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/3EsVEnV2QwDau8JowS2kPh'},\n", + " 'href': 'https://api.spotify.com/v1/albums/3EsVEnV2QwDau8JowS2kPh',\n", + " 'id': '3EsVEnV2QwDau8JowS2kPh',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273454db658edae29050967bf00',\n", + " 'width': 640},\n", + " {'height': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02454db658edae29050967bf00',\n", + " 'width': 300},\n", + " {'height': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851454db658edae29050967bf00',\n", + " 'width': 64}],\n", + " 'is_playable': True,\n", + " 'name': 'Bailando Sobre las Ruinas',\n", + " 'release_date': '2016-07-27',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 15,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:3EsVEnV2QwDau8JowS2kPh'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 208066,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'GBLFP1883460'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/2ntUj3hnSU7GQTKA9oZWW1'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/2ntUj3hnSU7GQTKA9oZWW1',\n", + " 'id': '2ntUj3hnSU7GQTKA9oZWW1',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Los Que Se Quedan, los Que Se Van',\n", + " 'popularity': 35,\n", + " 'preview_url': 'https://p.scdn.co/mp3-preview/948d3e717cbf99395cc88d4e38f15ebdb398625f?cid=e858f767f96c426dbb8fa826f342ea91',\n", + " 'track_number': 7,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:2ntUj3hnSU7GQTKA9oZWW1'},\n", + " {'album': {'album_group': 'album',\n", + " 'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/5OKWWFk87T5zOIRGNkgBuJ'},\n", + " 'href': 'https://api.spotify.com/v1/albums/5OKWWFk87T5zOIRGNkgBuJ',\n", + " 'id': '5OKWWFk87T5zOIRGNkgBuJ',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b27374d3d715e5b04d7956b6a53b',\n", + " 'width': 640},\n", + " {'height': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e0274d3d715e5b04d7956b6a53b',\n", + " 'width': 300},\n", + " {'height': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000485174d3d715e5b04d7956b6a53b',\n", + " 'width': 64}],\n", + " 'is_playable': True,\n", + " 'name': 'En Vivo en el Teatro Teresa Carreño, Vol. 1',\n", + " 'release_date': '2003-12-18',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 17,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:5OKWWFk87T5zOIRGNkgBuJ'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 295693,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'GBMA21833403'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/6tJn0JYD6QKE6eXbh4829b'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/6tJn0JYD6QKE6eXbh4829b',\n", + " 'id': '6tJn0JYD6QKE6eXbh4829b',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Tiembla - En Vivo',\n", + " 'popularity': 34,\n", + " 'preview_url': 'https://p.scdn.co/mp3-preview/6acea7598aae6de6276635b3ad9545ff21fc4745?cid=e858f767f96c426dbb8fa826f342ea91',\n", + " 'track_number': 15,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:6tJn0JYD6QKE6eXbh4829b'},\n", + " {'album': {'album_group': 'single',\n", + " 'album_type': 'single',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/2380CO9zakhJlgj27aK2bo'},\n", + " 'href': 'https://api.spotify.com/v1/albums/2380CO9zakhJlgj27aK2bo',\n", + " 'id': '2380CO9zakhJlgj27aK2bo',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273232012c54d6bda9de32cd16c',\n", + " 'width': 640},\n", + " {'height': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02232012c54d6bda9de32cd16c',\n", + " 'width': 300},\n", + " {'height': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851232012c54d6bda9de32cd16c',\n", + " 'width': 64}],\n", + " 'is_playable': True,\n", + " 'name': 'Desorden Público rinde Homenaje al Indio Pastor López (Medley al Pastor)',\n", + " 'release_date': '2022-04-05',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 2,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:2380CO9zakhJlgj27aK2bo'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/27neIga89YKdkCk6Yzv0ni'},\n", + " 'href': 'https://api.spotify.com/v1/artists/27neIga89YKdkCk6Yzv0ni',\n", + " 'id': '27neIga89YKdkCk6Yzv0ni',\n", + " 'name': 'Puerto Candelaria',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:27neIga89YKdkCk6Yzv0ni'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 86570,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'FR2X42281590'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/1TQLNy86xeKIBnB4O2LOWr'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/1TQLNy86xeKIBnB4O2LOWr',\n", + " 'id': '1TQLNy86xeKIBnB4O2LOWr',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'La Cumbia - Desorden Público rinde Homenaje al Indio Pastor López',\n", + " 'popularity': 33,\n", + " 'preview_url': 'https://p.scdn.co/mp3-preview/47146a58820ef7cb7b15566ff5de7607f8ccee8a?cid=e858f767f96c426dbb8fa826f342ea91',\n", + " 'track_number': 2,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:1TQLNy86xeKIBnB4O2LOWr'},\n", + " {'album': {'album_group': 'album',\n", + " 'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/31XY0ubpjtgP7dvdzPoqyq'},\n", + " 'href': 'https://api.spotify.com/v1/albums/31XY0ubpjtgP7dvdzPoqyq',\n", + " 'id': '31XY0ubpjtgP7dvdzPoqyq',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b2733075294ef28bacdf389b01de',\n", + " 'width': 640},\n", + " {'height': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e023075294ef28bacdf389b01de',\n", + " 'width': 300},\n", + " {'height': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d000048513075294ef28bacdf389b01de',\n", + " 'width': 64}],\n", + " 'is_playable': True,\n", + " 'name': 'Canto Popular de la Vida y la Muerte',\n", + " 'release_date': '2015-12-11',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 17,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:31XY0ubpjtgP7dvdzPoqyq'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 274880,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'VEB011500016'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/1f9X3c8Bzn79zkCwnZ2vay'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/1f9X3c8Bzn79zkCwnZ2vay',\n", + " 'id': '1f9X3c8Bzn79zkCwnZ2vay',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'La Danza de los Esqueletos',\n", + " 'popularity': 29,\n", + " 'preview_url': 'https://p.scdn.co/mp3-preview/df76e41b4e9fc4d7f80bed28309fcb2b6911beba?cid=e858f767f96c426dbb8fa826f342ea91',\n", + " 'track_number': 10,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:1f9X3c8Bzn79zkCwnZ2vay'},\n", + " {'album': {'album_group': 'album',\n", + " 'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/52GH2wOeRH1vDBSFs1Dp0C'},\n", + " 'href': 'https://api.spotify.com/v1/albums/52GH2wOeRH1vDBSFs1Dp0C',\n", + " 'id': '52GH2wOeRH1vDBSFs1Dp0C',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b2734814ca3d1b3ef987ab57e911',\n", + " 'width': 640},\n", + " {'height': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e024814ca3d1b3ef987ab57e911',\n", + " 'width': 300},\n", + " {'height': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d000048514814ca3d1b3ef987ab57e911',\n", + " 'width': 64}],\n", + " 'is_playable': True,\n", + " 'name': 'Los Contrarios',\n", + " 'release_date': '2011-04-07',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 15,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:52GH2wOeRH1vDBSFs1Dp0C'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 190946,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'GBMA21834519'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/5iuzPrZExQitcYGBShOSvW'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/5iuzPrZExQitcYGBShOSvW',\n", + " 'id': '5iuzPrZExQitcYGBShOSvW',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Música de Fiesta',\n", + " 'popularity': 28,\n", + " 'preview_url': 'https://p.scdn.co/mp3-preview/54fb17852240ac22b0d0bc9f176aa47289f6297d?cid=e858f767f96c426dbb8fa826f342ea91',\n", + " 'track_number': 2,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:5iuzPrZExQitcYGBShOSvW'},\n", + " {'album': {'album_group': 'album',\n", + " 'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/31XY0ubpjtgP7dvdzPoqyq'},\n", + " 'href': 'https://api.spotify.com/v1/albums/31XY0ubpjtgP7dvdzPoqyq',\n", + " 'id': '31XY0ubpjtgP7dvdzPoqyq',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b2733075294ef28bacdf389b01de',\n", + " 'width': 640},\n", + " {'height': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e023075294ef28bacdf389b01de',\n", + " 'width': 300},\n", + " {'height': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d000048513075294ef28bacdf389b01de',\n", + " 'width': 64}],\n", + " 'is_playable': True,\n", + " 'name': 'Canto Popular de la Vida y la Muerte',\n", + " 'release_date': '2015-12-11',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 17,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:31XY0ubpjtgP7dvdzPoqyq'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 228986,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'VEB011500011'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/1eEFMib4nzsUaeWYN0n5Ot'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/1eEFMib4nzsUaeWYN0n5Ot',\n", + " 'id': '1eEFMib4nzsUaeWYN0n5Ot',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Tiemble',\n", + " 'popularity': 28,\n", + " 'preview_url': 'https://p.scdn.co/mp3-preview/5ff72ee895dc2013dd0c042742cfa1e08005478c?cid=e858f767f96c426dbb8fa826f342ea91',\n", + " 'track_number': 5,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:1eEFMib4nzsUaeWYN0n5Ot'},\n", + " {'album': {'album_group': 'album',\n", + " 'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/1MmERt4roD69181rnpjgLD'},\n", + " 'href': 'https://api.spotify.com/v1/albums/1MmERt4roD69181rnpjgLD',\n", + " 'id': '1MmERt4roD69181rnpjgLD',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273a1ced2d5c9e197bd2674cc5d',\n", + " 'width': 640},\n", + " {'height': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02a1ced2d5c9e197bd2674cc5d',\n", + " 'width': 300},\n", + " {'height': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851a1ced2d5c9e197bd2674cc5d',\n", + " 'width': 64}],\n", + " 'is_playable': True,\n", + " 'name': 'Diablo',\n", + " 'release_date': '2000-12-11',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 14,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:1MmERt4roD69181rnpjgLD'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 260160,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'GBMA21838866'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/6B9NhbeAAvCX0oqQLL4inQ'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/6B9NhbeAAvCX0oqQLL4inQ',\n", + " 'id': '6B9NhbeAAvCX0oqQLL4inQ',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Combate',\n", + " 'popularity': 27,\n", + " 'preview_url': 'https://p.scdn.co/mp3-preview/e4464713e3fc9ef8e74810780bf4fa4caa4b97b7?cid=e858f767f96c426dbb8fa826f342ea91',\n", + " 'track_number': 1,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:6B9NhbeAAvCX0oqQLL4inQ'},\n", + " {'album': {'album_group': 'album',\n", + " 'album_type': 'album',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/3EsVEnV2QwDau8JowS2kPh'},\n", + " 'href': 'https://api.spotify.com/v1/albums/3EsVEnV2QwDau8JowS2kPh',\n", + " 'id': '3EsVEnV2QwDau8JowS2kPh',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b273454db658edae29050967bf00',\n", + " 'width': 640},\n", + " {'height': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e02454db658edae29050967bf00',\n", + " 'width': 300},\n", + " {'height': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00004851454db658edae29050967bf00',\n", + " 'width': 64}],\n", + " 'is_playable': True,\n", + " 'name': 'Bailando Sobre las Ruinas',\n", + " 'release_date': '2016-07-27',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 15,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:3EsVEnV2QwDau8JowS2kPh'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/0UZq6vAHrwGgctvxTzzxYm'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0UZq6vAHrwGgctvxTzzxYm',\n", + " 'id': '0UZq6vAHrwGgctvxTzzxYm',\n", + " 'name': 'Tokyo Ska Paradise Orchestra',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0UZq6vAHrwGgctvxTzzxYm'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 226480,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'GBLFP1882934'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/7Iwyf6xoHbLotyoIaUmKnr'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/7Iwyf6xoHbLotyoIaUmKnr',\n", + " 'id': '7Iwyf6xoHbLotyoIaUmKnr',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Ska Mundo Ska',\n", + " 'popularity': 27,\n", + " 'preview_url': 'https://p.scdn.co/mp3-preview/d36c30dfdffcb984da829dad91356dd265cce68d?cid=e858f767f96c426dbb8fa826f342ea91',\n", + " 'track_number': 4,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:7Iwyf6xoHbLotyoIaUmKnr'},\n", + " {'album': {'album_group': 'single',\n", + " 'album_type': 'single',\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'}],\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/album/0hFL6zBllV0W3f9HdvMgMz'},\n", + " 'href': 'https://api.spotify.com/v1/albums/0hFL6zBllV0W3f9HdvMgMz',\n", + " 'id': '0hFL6zBllV0W3f9HdvMgMz',\n", + " 'images': [{'height': 640,\n", + " 'url': 'https://i.scdn.co/image/ab67616d0000b2730858b2df5c666e674178d80f',\n", + " 'width': 640},\n", + " {'height': 300,\n", + " 'url': 'https://i.scdn.co/image/ab67616d00001e020858b2df5c666e674178d80f',\n", + " 'width': 300},\n", + " {'height': 64,\n", + " 'url': 'https://i.scdn.co/image/ab67616d000048510858b2df5c666e674178d80f',\n", + " 'width': 64}],\n", + " 'is_playable': True,\n", + " 'name': 'Traicionera / El Reo Ausente (Desorden Público rinde Homenaje al Indio Pastor López)',\n", + " 'release_date': '2021-11-15',\n", + " 'release_date_precision': 'day',\n", + " 'total_tracks': 1,\n", + " 'type': 'album',\n", + " 'uri': 'spotify:album:0hFL6zBllV0W3f9HdvMgMz'},\n", + " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/0kyQwKHCZnKE7kTXkxXjrB'},\n", + " 'href': 'https://api.spotify.com/v1/artists/0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'id': '0kyQwKHCZnKE7kTXkxXjrB',\n", + " 'name': 'Desorden Público',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:0kyQwKHCZnKE7kTXkxXjrB'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/6Hs8U0JO2nacXFG4kp15Co'},\n", + " 'href': 'https://api.spotify.com/v1/artists/6Hs8U0JO2nacXFG4kp15Co',\n", + " 'id': '6Hs8U0JO2nacXFG4kp15Co',\n", + " 'name': 'Chico Trujillo',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:6Hs8U0JO2nacXFG4kp15Co'},\n", + " {'external_urls': {'spotify': 'https://open.spotify.com/artist/5QJLZDRwx6z7xCKkk9QmBu'},\n", + " 'href': 'https://api.spotify.com/v1/artists/5QJLZDRwx6z7xCKkk9QmBu',\n", + " 'id': '5QJLZDRwx6z7xCKkk9QmBu',\n", + " 'name': 'Digital Charanga',\n", + " 'type': 'artist',\n", + " 'uri': 'spotify:artist:5QJLZDRwx6z7xCKkk9QmBu'}],\n", + " 'disc_number': 1,\n", + " 'duration_ms': 171733,\n", + " 'explicit': False,\n", + " 'external_ids': {'isrc': 'FRX872126961'},\n", + " 'external_urls': {'spotify': 'https://open.spotify.com/track/4DPRgzo3TmEOM6DZM11cZU'},\n", + " 'href': 'https://api.spotify.com/v1/tracks/4DPRgzo3TmEOM6DZM11cZU',\n", + " 'id': '4DPRgzo3TmEOM6DZM11cZU',\n", + " 'is_local': False,\n", + " 'is_playable': True,\n", + " 'name': 'Traicionera / El Reo Ausente - Desorden Público rinde Homenaje al Indio Pastor López',\n", + " 'popularity': 26,\n", + " 'preview_url': 'https://p.scdn.co/mp3-preview/daf540874698712fe0db75ff5cc287eea5bc8dce?cid=e858f767f96c426dbb8fa826f342ea91',\n", + " 'track_number': 1,\n", + " 'type': 'track',\n", + " 'uri': 'spotify:track:4DPRgzo3TmEOM6DZM11cZU'}]}" + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "top_tracks = '/top-tracks'\n", + "country = '?country=es'\n", + "print(base_url + resource + id_artist + top_tracks + country)\n", + "my_artist_top_tracks = requests.get((base_url + resource + id_artist + top_tracks + country) , headers = header_info).json()\n", + "my_artist_top_tracks" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d2f81cb7", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "id": "98827be6", + "metadata": {}, + "source": [ + "---\n", + "\n", + "### Bonus track!!!\n", + "\n", + "You can publish your own Playlist with [`/playlists`](https://developer.spotify.com/documentation/web-api/reference/#/operations/create-playlist) and [`/tracks`](https://developer.spotify.com/documentation/web-api/reference/#/operations/add-tracks-to-playlist).\n", + "\n", + "![I quit](https://media.giphy.com/media/gui67fZ3xIneM/giphy.gif)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2e5f0905", + "metadata": {}, + "outputs": [], + "source": [ + "# Bonus\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "9436b623", + "metadata": {}, + "source": [ + "---" + ] + }, + { + "cell_type": "markdown", + "id": "a9487ef7", + "metadata": {}, + "source": [ + "You can always try with the [wrapper](https://github.com/plamere/spotipy)!!!\n", + "\n", + "![I quit](https://media.giphy.com/media/3oFzlXPvXYZ4q8VQOs/giphy.gif)" + ] + }, + { + "cell_type": "markdown", + "id": "0a399ce8", + "metadata": {}, + "source": [ + "---" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python [conda env:m1_env]", + "language": "python", + "name": "conda-env-m1_env-py" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}