diff --git a/Spotify/Spotify_Get_Artists_Top_Tracks.ipynb b/Spotify/Spotify_Get_Artists_Top_Tracks.ipynb index 1f5a4c609b..bb01ef23d6 100644 --- a/Spotify/Spotify_Get_Artists_Top_Tracks.ipynb +++ b/Spotify/Spotify_Get_Artists_Top_Tracks.ipynb @@ -135,8 +135,8 @@ }, "outputs": [], "source": [ - "client_id = \"YOUR_SPOTIFY_CLIENT_ID\"\n", - "client_secret = \"YOUR_SPOTIFY_CLIENT_SECRET\"\n", + "client_id = naas.secret.get(\"SPOTIFY_CLIENT_ID\") or \"YOUR_SPOTIFY_CLIENT_ID\"\n", + "client_secret = naas.secret.get(\"SPOTIFY_CLIENT_SECRET\") or \"YOUR_SPOTIFY_CLIENT_SECRET\"\n", "artist_id = \"20wkVLutqVOYrc0kxFs7rA\"" ] }, @@ -167,523 +167,12 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "id": "9052e5bc-2c74-466d-808e-74eee79eee88", "metadata": { - "execution": { - "iopub.execute_input": "2023-12-08T03:34:06.565308Z", - "iopub.status.busy": "2023-12-08T03:34:06.564890Z", - "iopub.status.idle": "2023-12-08T03:34:06.871031Z", - "shell.execute_reply": "2023-12-08T03:34:06.870282Z", - "shell.execute_reply.started": "2023-12-08T03:34:06.565276Z" - }, "tags": [] }, - "outputs": [ - { - "data": { - "text/plain": [ - "{'tracks': [{'album': {'album_type': 'album',\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/album/3xybjP7r2VsWzwvDQipdM0'},\n", - " 'href': 'https://api.spotify.com/v1/albums/3xybjP7r2VsWzwvDQipdM0',\n", - " 'id': '3xybjP7r2VsWzwvDQipdM0',\n", - " 'images': [{'height': 640,\n", - " 'url': 'https://i.scdn.co/image/ab67616d0000b2733138f891f3075c9c5d944037',\n", - " 'width': 640},\n", - " {'height': 300,\n", - " 'url': 'https://i.scdn.co/image/ab67616d00001e023138f891f3075c9c5d944037',\n", - " 'width': 300},\n", - " {'height': 64,\n", - " 'url': 'https://i.scdn.co/image/ab67616d000048513138f891f3075c9c5d944037',\n", - " 'width': 64}],\n", - " 'is_playable': True,\n", - " 'name': 'Freudian',\n", - " 'release_date': '2017-08-25',\n", - " 'release_date_precision': 'day',\n", - " 'total_tracks': 10,\n", - " 'type': 'album',\n", - " 'uri': 'spotify:album:3xybjP7r2VsWzwvDQipdM0'},\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'},\n", - " {'external_urls': {'spotify': 'https://open.spotify.com/artist/3Y7RZ31TRPVadSFVy1o8os'},\n", - " 'href': 'https://api.spotify.com/v1/artists/3Y7RZ31TRPVadSFVy1o8os',\n", - " 'id': '3Y7RZ31TRPVadSFVy1o8os',\n", - " 'name': 'H.E.R.',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:3Y7RZ31TRPVadSFVy1o8os'}],\n", - " 'disc_number': 1,\n", - " 'duration_ms': 209831,\n", - " 'explicit': False,\n", - " 'external_ids': {'isrc': 'CADDS1700022'},\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/track/1RMJOxR6GRPsBHL8qeC2ux'},\n", - " 'href': 'https://api.spotify.com/v1/tracks/1RMJOxR6GRPsBHL8qeC2ux',\n", - " 'id': '1RMJOxR6GRPsBHL8qeC2ux',\n", - " 'is_local': False,\n", - " 'is_playable': True,\n", - " 'name': 'Best Part (feat. H.E.R.)',\n", - " 'popularity': 86,\n", - " 'preview_url': 'https://p.scdn.co/mp3-preview/c3c8ed8ba1546630a13ffb139b405800c121e10d?cid=c112067061f74b66ba1bbf813eacbc08',\n", - " 'track_number': 2,\n", - " 'type': 'track',\n", - " 'uri': 'spotify:track:1RMJOxR6GRPsBHL8qeC2ux'},\n", - " {'album': {'album_type': 'album',\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/album/3xybjP7r2VsWzwvDQipdM0'},\n", - " 'href': 'https://api.spotify.com/v1/albums/3xybjP7r2VsWzwvDQipdM0',\n", - " 'id': '3xybjP7r2VsWzwvDQipdM0',\n", - " 'images': [{'height': 640,\n", - " 'url': 'https://i.scdn.co/image/ab67616d0000b2733138f891f3075c9c5d944037',\n", - " 'width': 640},\n", - " {'height': 300,\n", - " 'url': 'https://i.scdn.co/image/ab67616d00001e023138f891f3075c9c5d944037',\n", - " 'width': 300},\n", - " {'height': 64,\n", - " 'url': 'https://i.scdn.co/image/ab67616d000048513138f891f3075c9c5d944037',\n", - " 'width': 64}],\n", - " 'is_playable': True,\n", - " 'name': 'Freudian',\n", - " 'release_date': '2017-08-25',\n", - " 'release_date_precision': 'day',\n", - " 'total_tracks': 10,\n", - " 'type': 'album',\n", - " 'uri': 'spotify:album:3xybjP7r2VsWzwvDQipdM0'},\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'},\n", - " {'external_urls': {'spotify': 'https://open.spotify.com/artist/1U1el3k54VvEUzo3ybLPlM'},\n", - " 'href': 'https://api.spotify.com/v1/artists/1U1el3k54VvEUzo3ybLPlM',\n", - " 'id': '1U1el3k54VvEUzo3ybLPlM',\n", - " 'name': 'Kali Uchis',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:1U1el3k54VvEUzo3ybLPlM'}],\n", - " 'disc_number': 1,\n", - " 'duration_ms': 278179,\n", - " 'explicit': False,\n", - " 'external_ids': {'isrc': 'TCACR1690004'},\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/track/7zFXmv6vqI4qOt4yGf3jYZ'},\n", - " 'href': 'https://api.spotify.com/v1/tracks/7zFXmv6vqI4qOt4yGf3jYZ',\n", - " 'id': '7zFXmv6vqI4qOt4yGf3jYZ',\n", - " 'is_local': False,\n", - " 'is_playable': True,\n", - " 'name': 'Get You (feat. Kali Uchis)',\n", - " 'popularity': 85,\n", - " 'preview_url': 'https://p.scdn.co/mp3-preview/50f8ebebe7de796d2519b203077d119e66a90ea3?cid=c112067061f74b66ba1bbf813eacbc08',\n", - " 'track_number': 1,\n", - " 'type': 'track',\n", - " 'uri': 'spotify:track:7zFXmv6vqI4qOt4yGf3jYZ'},\n", - " {'album': {'album_type': 'album',\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/album/7ivbFszr1TbVadj89BIy1y'},\n", - " 'href': 'https://api.spotify.com/v1/albums/7ivbFszr1TbVadj89BIy1y',\n", - " 'id': '7ivbFszr1TbVadj89BIy1y',\n", - " 'images': [{'height': 640,\n", - " 'url': 'https://i.scdn.co/image/ab67616d0000b2737c68face1dc58127f3a7b1cc',\n", - " 'width': 640},\n", - " {'height': 300,\n", - " 'url': 'https://i.scdn.co/image/ab67616d00001e027c68face1dc58127f3a7b1cc',\n", - " 'width': 300},\n", - " {'height': 64,\n", - " 'url': 'https://i.scdn.co/image/ab67616d000048517c68face1dc58127f3a7b1cc',\n", - " 'width': 64}],\n", - " 'is_playable': True,\n", - " 'name': 'NEVER ENOUGH',\n", - " 'release_date': '2023-04-07',\n", - " 'release_date_precision': 'day',\n", - " 'total_tracks': 15,\n", - " 'type': 'album',\n", - " 'uri': 'spotify:album:7ivbFszr1TbVadj89BIy1y'},\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'disc_number': 1,\n", - " 'duration_ms': 225312,\n", - " 'explicit': True,\n", - " 'external_ids': {'isrc': 'USUG12209355'},\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/track/2LlOeW5rVcvl3QcPNPcDus'},\n", - " 'href': 'https://api.spotify.com/v1/tracks/2LlOeW5rVcvl3QcPNPcDus',\n", - " 'id': '2LlOeW5rVcvl3QcPNPcDus',\n", - " 'is_local': False,\n", - " 'is_playable': True,\n", - " 'name': 'Always',\n", - " 'popularity': 84,\n", - " 'preview_url': None,\n", - " 'track_number': 6,\n", - " 'type': 'track',\n", - " 'uri': 'spotify:track:2LlOeW5rVcvl3QcPNPcDus'},\n", - " {'album': {'album_type': 'album',\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1uNFoZAHBGtllmzznpCI3s'},\n", - " 'href': 'https://api.spotify.com/v1/artists/1uNFoZAHBGtllmzznpCI3s',\n", - " 'id': '1uNFoZAHBGtllmzznpCI3s',\n", - " 'name': 'Justin Bieber',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:1uNFoZAHBGtllmzznpCI3s'}],\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/album/5dGWwsZ9iB2Xc3UKR0gif2'},\n", - " 'href': 'https://api.spotify.com/v1/albums/5dGWwsZ9iB2Xc3UKR0gif2',\n", - " 'id': '5dGWwsZ9iB2Xc3UKR0gif2',\n", - " 'images': [{'height': 640,\n", - " 'url': 'https://i.scdn.co/image/ab67616d0000b273e6f407c7f3a0ec98845e4431',\n", - " 'width': 640},\n", - " {'height': 300,\n", - " 'url': 'https://i.scdn.co/image/ab67616d00001e02e6f407c7f3a0ec98845e4431',\n", - " 'width': 300},\n", - " {'height': 64,\n", - " 'url': 'https://i.scdn.co/image/ab67616d00004851e6f407c7f3a0ec98845e4431',\n", - " 'width': 64}],\n", - " 'is_playable': True,\n", - " 'name': 'Justice',\n", - " 'release_date': '2021-03-19',\n", - " 'release_date_precision': 'day',\n", - " 'total_tracks': 16,\n", - " 'type': 'album',\n", - " 'uri': 'spotify:album:5dGWwsZ9iB2Xc3UKR0gif2'},\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1uNFoZAHBGtllmzznpCI3s'},\n", - " 'href': 'https://api.spotify.com/v1/artists/1uNFoZAHBGtllmzznpCI3s',\n", - " 'id': '1uNFoZAHBGtllmzznpCI3s',\n", - " 'name': 'Justin Bieber',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:1uNFoZAHBGtllmzznpCI3s'},\n", - " {'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'},\n", - " {'external_urls': {'spotify': 'https://open.spotify.com/artist/4fxd5Ee7UefO4CUXgwJ7IP'},\n", - " 'href': 'https://api.spotify.com/v1/artists/4fxd5Ee7UefO4CUXgwJ7IP',\n", - " 'id': '4fxd5Ee7UefO4CUXgwJ7IP',\n", - " 'name': 'Giveon',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:4fxd5Ee7UefO4CUXgwJ7IP'}],\n", - " 'disc_number': 1,\n", - " 'duration_ms': 198081,\n", - " 'explicit': True,\n", - " 'external_ids': {'isrc': 'USUM72102636'},\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/track/4iJyoBOLtHqaGxP12qzhQI'},\n", - " 'href': 'https://api.spotify.com/v1/tracks/4iJyoBOLtHqaGxP12qzhQI',\n", - " 'id': '4iJyoBOLtHqaGxP12qzhQI',\n", - " 'is_local': False,\n", - " 'is_playable': True,\n", - " 'name': 'Peaches (feat. Daniel Caesar & Giveon)',\n", - " 'popularity': 83,\n", - " 'preview_url': None,\n", - " 'track_number': 12,\n", - " 'type': 'track',\n", - " 'uri': 'spotify:track:4iJyoBOLtHqaGxP12qzhQI'},\n", - " {'album': {'album_type': 'single',\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/album/5qfhZ5YkZ4LhEUbYgjrWt6'},\n", - " 'href': 'https://api.spotify.com/v1/albums/5qfhZ5YkZ4LhEUbYgjrWt6',\n", - " 'id': '5qfhZ5YkZ4LhEUbYgjrWt6',\n", - " 'images': [{'height': 640,\n", - " 'url': 'https://i.scdn.co/image/ab67616d0000b273617c314e94693fad9a26f798',\n", - " 'width': 640},\n", - " {'height': 300,\n", - " 'url': 'https://i.scdn.co/image/ab67616d00001e02617c314e94693fad9a26f798',\n", - " 'width': 300},\n", - " {'height': 64,\n", - " 'url': 'https://i.scdn.co/image/ab67616d00004851617c314e94693fad9a26f798',\n", - " 'width': 64}],\n", - " 'is_playable': True,\n", - " 'name': 'Get You - Single',\n", - " 'release_date': '2016-10-21',\n", - " 'release_date_precision': 'day',\n", - " 'total_tracks': 2,\n", - " 'type': 'album',\n", - " 'uri': 'spotify:album:5qfhZ5YkZ4LhEUbYgjrWt6'},\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'disc_number': 1,\n", - " 'duration_ms': 270846,\n", - " 'explicit': True,\n", - " 'external_ids': {'isrc': 'TCACR1690007'},\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/track/1boXOL0ua7N2iCOUVI1p9F'},\n", - " 'href': 'https://api.spotify.com/v1/tracks/1boXOL0ua7N2iCOUVI1p9F',\n", - " 'id': '1boXOL0ua7N2iCOUVI1p9F',\n", - " 'is_local': False,\n", - " 'is_playable': True,\n", - " 'name': 'Japanese Denim',\n", - " 'popularity': 82,\n", - " 'preview_url': 'https://p.scdn.co/mp3-preview/ee5340b8b4f71426681b2a59a5118fd14ea19b4f?cid=c112067061f74b66ba1bbf813eacbc08',\n", - " 'track_number': 2,\n", - " 'type': 'track',\n", - " 'uri': 'spotify:track:1boXOL0ua7N2iCOUVI1p9F'},\n", - " {'album': {'album_type': 'album',\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/album/7ivbFszr1TbVadj89BIy1y'},\n", - " 'href': 'https://api.spotify.com/v1/albums/7ivbFszr1TbVadj89BIy1y',\n", - " 'id': '7ivbFszr1TbVadj89BIy1y',\n", - " 'images': [{'height': 640,\n", - " 'url': 'https://i.scdn.co/image/ab67616d0000b2737c68face1dc58127f3a7b1cc',\n", - " 'width': 640},\n", - " {'height': 300,\n", - " 'url': 'https://i.scdn.co/image/ab67616d00001e027c68face1dc58127f3a7b1cc',\n", - " 'width': 300},\n", - " {'height': 64,\n", - " 'url': 'https://i.scdn.co/image/ab67616d000048517c68face1dc58127f3a7b1cc',\n", - " 'width': 64}],\n", - " 'is_playable': True,\n", - " 'name': 'NEVER ENOUGH',\n", - " 'release_date': '2023-04-07',\n", - " 'release_date_precision': 'day',\n", - " 'total_tracks': 15,\n", - " 'type': 'album',\n", - " 'uri': 'spotify:album:7ivbFszr1TbVadj89BIy1y'},\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'disc_number': 1,\n", - " 'duration_ms': 174512,\n", - " 'explicit': False,\n", - " 'external_ids': {'isrc': 'USUG12209368'},\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/track/736PP5LTtREkDgktNmX3Gu'},\n", - " 'href': 'https://api.spotify.com/v1/tracks/736PP5LTtREkDgktNmX3Gu',\n", - " 'id': '736PP5LTtREkDgktNmX3Gu',\n", - " 'is_local': False,\n", - " 'is_playable': True,\n", - " 'name': 'Superpowers',\n", - " 'popularity': 76,\n", - " 'preview_url': None,\n", - " 'track_number': 14,\n", - " 'type': 'track',\n", - " 'uri': 'spotify:track:736PP5LTtREkDgktNmX3Gu'},\n", - " {'album': {'album_type': 'album',\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/album/3xybjP7r2VsWzwvDQipdM0'},\n", - " 'href': 'https://api.spotify.com/v1/albums/3xybjP7r2VsWzwvDQipdM0',\n", - " 'id': '3xybjP7r2VsWzwvDQipdM0',\n", - " 'images': [{'height': 640,\n", - " 'url': 'https://i.scdn.co/image/ab67616d0000b2733138f891f3075c9c5d944037',\n", - " 'width': 640},\n", - " {'height': 300,\n", - " 'url': 'https://i.scdn.co/image/ab67616d00001e023138f891f3075c9c5d944037',\n", - " 'width': 300},\n", - " {'height': 64,\n", - " 'url': 'https://i.scdn.co/image/ab67616d000048513138f891f3075c9c5d944037',\n", - " 'width': 64}],\n", - " 'is_playable': True,\n", - " 'name': 'Freudian',\n", - " 'release_date': '2017-08-25',\n", - " 'release_date_precision': 'day',\n", - " 'total_tracks': 10,\n", - " 'type': 'album',\n", - " 'uri': 'spotify:album:3xybjP7r2VsWzwvDQipdM0'},\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'disc_number': 1,\n", - " 'duration_ms': 185522,\n", - " 'explicit': False,\n", - " 'external_ids': {'isrc': 'CADDS1700028'},\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/track/59acp1OhcvxwVBwQJBYKuX'},\n", - " 'href': 'https://api.spotify.com/v1/tracks/59acp1OhcvxwVBwQJBYKuX',\n", - " 'id': '59acp1OhcvxwVBwQJBYKuX',\n", - " 'is_local': False,\n", - " 'is_playable': True,\n", - " 'name': 'Loose',\n", - " 'popularity': 77,\n", - " 'preview_url': 'https://p.scdn.co/mp3-preview/b08c29b19a6fbe2b320d72c97d83b9c74589a4d6?cid=c112067061f74b66ba1bbf813eacbc08',\n", - " 'track_number': 5,\n", - " 'type': 'track',\n", - " 'uri': 'spotify:track:59acp1OhcvxwVBwQJBYKuX'},\n", - " {'album': {'album_type': 'album',\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/album/4mvxoogQn8p84Wz17zTHnJ'},\n", - " 'href': 'https://api.spotify.com/v1/albums/4mvxoogQn8p84Wz17zTHnJ',\n", - " 'id': '4mvxoogQn8p84Wz17zTHnJ',\n", - " 'images': [{'height': 640,\n", - " 'url': 'https://i.scdn.co/image/ab67616d0000b2737607aa9ae7904e1b12907c93',\n", - " 'width': 640},\n", - " {'height': 300,\n", - " 'url': 'https://i.scdn.co/image/ab67616d00001e027607aa9ae7904e1b12907c93',\n", - " 'width': 300},\n", - " {'height': 64,\n", - " 'url': 'https://i.scdn.co/image/ab67616d000048517607aa9ae7904e1b12907c93',\n", - " 'width': 64}],\n", - " 'is_playable': True,\n", - " 'name': 'CASE STUDY 01',\n", - " 'release_date': '2019-06-28',\n", - " 'release_date_precision': 'day',\n", - " 'total_tracks': 10,\n", - " 'type': 'album',\n", - " 'uri': 'spotify:album:4mvxoogQn8p84Wz17zTHnJ'},\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'disc_number': 1,\n", - " 'duration_ms': 194959,\n", - " 'explicit': True,\n", - " 'external_ids': {'isrc': 'QM6N21983282'},\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/track/3uouaAVXpQR3X8RYkJyitQ'},\n", - " 'href': 'https://api.spotify.com/v1/tracks/3uouaAVXpQR3X8RYkJyitQ',\n", - " 'id': '3uouaAVXpQR3X8RYkJyitQ',\n", - " 'is_local': False,\n", - " 'is_playable': True,\n", - " 'name': 'CYANIDE',\n", - " 'popularity': 75,\n", - " 'preview_url': 'https://p.scdn.co/mp3-preview/5069a8ff35f6c416c290b9da7c2e094a9702b3b6?cid=c112067061f74b66ba1bbf813eacbc08',\n", - " 'track_number': 2,\n", - " 'type': 'track',\n", - " 'uri': 'spotify:track:3uouaAVXpQR3X8RYkJyitQ'},\n", - " {'album': {'album_type': 'single',\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/album/15M9pZ8gsdoN67yLjyQ039'},\n", - " 'href': 'https://api.spotify.com/v1/albums/15M9pZ8gsdoN67yLjyQ039',\n", - " 'id': '15M9pZ8gsdoN67yLjyQ039',\n", - " 'images': [{'height': 640,\n", - " 'url': 'https://i.scdn.co/image/ab67616d0000b273c70176fa51326491ecc5f79e',\n", - " 'width': 640},\n", - " {'height': 300,\n", - " 'url': 'https://i.scdn.co/image/ab67616d00001e02c70176fa51326491ecc5f79e',\n", - " 'width': 300},\n", - " {'height': 64,\n", - " 'url': 'https://i.scdn.co/image/ab67616d00004851c70176fa51326491ecc5f79e',\n", - " 'width': 64}],\n", - " 'is_playable': True,\n", - " 'name': 'Who Hurt You?',\n", - " 'release_date': '2018-10-16',\n", - " 'release_date_precision': 'day',\n", - " 'total_tracks': 1,\n", - " 'type': 'album',\n", - " 'uri': 'spotify:album:15M9pZ8gsdoN67yLjyQ039'},\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'disc_number': 1,\n", - " 'duration_ms': 231964,\n", - " 'explicit': True,\n", - " 'external_ids': {'isrc': 'TCADX1816901'},\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/track/23c9gmiiv7RCu7twft0Mym'},\n", - " 'href': 'https://api.spotify.com/v1/tracks/23c9gmiiv7RCu7twft0Mym',\n", - " 'id': '23c9gmiiv7RCu7twft0Mym',\n", - " 'is_local': False,\n", - " 'is_playable': True,\n", - " 'name': 'Who Hurt You?',\n", - " 'popularity': 75,\n", - " 'preview_url': 'https://p.scdn.co/mp3-preview/f6a819d48858ea32cffcbb8815e0e4d55a2e45da?cid=c112067061f74b66ba1bbf813eacbc08',\n", - " 'track_number': 1,\n", - " 'type': 'track',\n", - " 'uri': 'spotify:track:23c9gmiiv7RCu7twft0Mym'},\n", - " {'album': {'album_type': 'album',\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/album/7ivbFszr1TbVadj89BIy1y'},\n", - " 'href': 'https://api.spotify.com/v1/albums/7ivbFszr1TbVadj89BIy1y',\n", - " 'id': '7ivbFszr1TbVadj89BIy1y',\n", - " 'images': [{'height': 640,\n", - " 'url': 'https://i.scdn.co/image/ab67616d0000b2737c68face1dc58127f3a7b1cc',\n", - " 'width': 640},\n", - " {'height': 300,\n", - " 'url': 'https://i.scdn.co/image/ab67616d00001e027c68face1dc58127f3a7b1cc',\n", - " 'width': 300},\n", - " {'height': 64,\n", - " 'url': 'https://i.scdn.co/image/ab67616d000048517c68face1dc58127f3a7b1cc',\n", - " 'width': 64}],\n", - " 'is_playable': True,\n", - " 'name': 'NEVER ENOUGH',\n", - " 'release_date': '2023-04-07',\n", - " 'release_date_precision': 'day',\n", - " 'total_tracks': 15,\n", - " 'type': 'album',\n", - " 'uri': 'spotify:album:7ivbFszr1TbVadj89BIy1y'},\n", - " 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/20wkVLutqVOYrc0kxFs7rA'},\n", - " 'href': 'https://api.spotify.com/v1/artists/20wkVLutqVOYrc0kxFs7rA',\n", - " 'id': '20wkVLutqVOYrc0kxFs7rA',\n", - " 'name': 'Daniel Caesar',\n", - " 'type': 'artist',\n", - " 'uri': 'spotify:artist:20wkVLutqVOYrc0kxFs7rA'}],\n", - " 'disc_number': 1,\n", - " 'duration_ms': 216524,\n", - " 'explicit': False,\n", - " 'external_ids': {'isrc': 'USUG12209350'},\n", - " 'external_urls': {'spotify': 'https://open.spotify.com/track/3ym8ajVmKm6Fybgov3WBI5'},\n", - " 'href': 'https://api.spotify.com/v1/tracks/3ym8ajVmKm6Fybgov3WBI5',\n", - " 'id': '3ym8ajVmKm6Fybgov3WBI5',\n", - " 'is_local': False,\n", - " 'is_playable': True,\n", - " 'name': 'Let Me Go',\n", - " 'popularity': 71,\n", - " 'preview_url': None,\n", - " 'track_number': 4,\n", - " 'type': 'track',\n", - " 'uri': 'spotify:track:3ym8ajVmKm6Fybgov3WBI5'}]}" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "def get_artist(client_id, client_secret, artist_id):\n", " data = None\n", @@ -695,7 +184,7 @@ " return data\n", " \n", "data = get_artist(client_id, client_secret, artist_id)\n", - "data" + "# data" ] }, {