extract original thumbnail image

This commit is contained in:
mungai-njoroge
2023-07-06 13:52:32 +03:00
parent 6ef3cc3545
commit 65d21d07da
10 changed files with 47 additions and 27 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import requests
from app import settings
from app.utils.hashing import create_hash
from requests import ConnectionError, ReadTimeout
from requests import ConnectionError, HTTPError, ReadTimeout
import urllib.parse
@@ -19,7 +19,7 @@ def fetch_similar_artists(name: str):
try:
response = requests.get(url, timeout=10)
response.raise_for_status()
except (ConnectionError, ReadTimeout):
except (ConnectionError, ReadTimeout, HTTPError):
return []
data = response.json()