Update app.py
Browse files
app.py
CHANGED
@@ -89,7 +89,7 @@ async def get_track_download_url(track_id: str) -> str:
|
|
89 |
|
90 |
if response.headers.get('content-type', '').startswith('application/json'):
|
91 |
json_response = response.json()
|
92 |
-
if
|
93 |
break
|
94 |
|
95 |
api_rotator.update_last_successful(apis.index(api_url))
|
|
|
89 |
|
90 |
if response.headers.get('content-type', '').startswith('application/json'):
|
91 |
json_response = response.json()
|
92 |
+
if json_response.get("error", {}).get("code", "") == "error.api.content.video.unavailable":
|
93 |
break
|
94 |
|
95 |
api_rotator.update_last_successful(apis.index(api_url))
|