diff --git a/notes.md b/notes.md index c1d1144..24a47e7 100644 --- a/notes.md +++ b/notes.md @@ -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 diff --git a/src/scraping/musify.py b/src/scraping/musify.py index 1d68ffb..b4719bc 100644 --- a/src/scraping/musify.py +++ b/src/scraping/musify.py @@ -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: