Closed benoit74 closed 1 month ago
Since #341 ensures that all empty playlists are ignored, it's better to throw an error if no playlists with videos remain, rather than creating an empty ZIM file.
In the extract_videos_list method, after removing the empty playlists, adding the following two lines should be enough to throw an error:
for playlist in empty_playlists:
self.playlists.remove(playlist)
# Add these two lines
if not self.playlists:
raise Exception("No videos found in playlists")
WDYT?
I like it!
From https://github.com/openzim/youtube/pull/341#pullrequestreview-2324996456
What happens when the channel has no video, or the playlist(s) have no video in the end? Do we create an almost empty ZIM?
We need to ensure that scraper fails in such a situation with a clear error message.