fix: lyrics enpoint could crash the whole program

This commit is contained in:
Hazel 2024-05-21 13:37:26 +02:00
parent 000a6c0dba
commit 356ba658ce

View File

@ -589,6 +589,8 @@ class YoutubeMusic(SuperYouTube):
}, },
name=f"fetch_song_lyrics_{video_id}.json" name=f"fetch_song_lyrics_{video_id}.json"
) )
if r is None:
return None
dump_to_file(f"fetch_song_lyrics_{video_id}.json", r.text, is_json=True, exit_after_dump=False) dump_to_file(f"fetch_song_lyrics_{video_id}.json", r.text, is_json=True, exit_after_dump=False)