Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,7 +26,8 @@ def get_most_recent_album_name(artist_name: str) -> str:
|
|
| 26 |
artist_name: A string representing a valid name of a song.
|
| 27 |
"""
|
| 28 |
try:
|
| 29 |
-
# Search for the artist by
|
|
|
|
| 30 |
|
| 31 |
if result['artists']['items']:
|
| 32 |
artist_id = result['artists']['items'][0]['id']
|
|
|
|
| 26 |
artist_name: A string representing a valid name of a song.
|
| 27 |
"""
|
| 28 |
try:
|
| 29 |
+
# Search for the artist by name
|
| 30 |
+
result = sp.search(q=artist_name, type='artist', limit=1)
|
| 31 |
|
| 32 |
if result['artists']['items']:
|
| 33 |
artist_id = result['artists']['items'][0]['id']
|