Handling broken youtube channel

This commit is contained in:
Samuel Clay 2024-03-04 09:24:23 -05:00
parent 0181a2e4b0
commit 65e51ac6ec

View file

@ -169,8 +169,9 @@ class YoutubeFetcher:
title = channel["items"][0]["snippet"]["title"]
description = channel["items"][0]["snippet"]["description"]
uploads_list_id = channel["items"][0]["contentDetails"]["relatedPlaylists"]["uploads"]
except (IndexError, KeyError):
return
except (IndexError, KeyError) as e:
logging.debug(" ***> ~FRYoutube channel returned an error: ~FM~SB%s: %s" % (channel, e))
return None, None, None
return self.fetch_playlist_videos(uploads_list_id, title, description)