bugfix try catche request in musify

This commit is contained in:
lars 2022-11-08 22:35:40 +01:00
parent c79644d6a3
commit 5486f7f8d1
2 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,5 @@
# TO DO
- LYRICS
- add complete search of musify (scraping of artist page etc.) as last resort
- add a check if the songs truly are the same with non changebal attributes (length etc.)
- get additional ISRCs

View File

@ -29,7 +29,10 @@ def get_musify_url(row):
url = f"https://musify.club/search/suggestions?term={artists[0]} - {title}"
r = session.get(url=url)
try:
r = session.get(url=url)
except requests.exceptions.ConnectionError:
return None
if r.status_code == 200:
autocomplete = r.json()
for row in autocomplete: