Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yet another issue with empty playlists #375

Closed
benoit74 opened this issue Nov 1, 2024 · 0 comments · Fixed by #376
Closed

Yet another issue with empty playlists #375

benoit74 opened this issue Nov 1, 2024 · 0 comments · Fixed by #376
Assignees
Labels
bug regression Something was working is not working anymore

Comments

@benoit74
Copy link
Collaborator

benoit74 commented Nov 1, 2024

https://farm.openzim.org/pipeline/d3ec6e04-5f5a-4c0f-8c31-4467d6508e77

[youtube2zim::2024-11-01 15:03:40,445] INFO:creating JSON files
[youtube2zim::2024-11-01 15:03:40,487] ERROR:Interrupting process due to error: list index out of range
[youtube2zim::2024-11-01 15:03:40,487] ERROR:list index out of range
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/youtube2zim/scraper.py", line 403, in run
    self.make_json_files(succeeded)
  File "/usr/local/lib/python3.12/site-packages/youtube2zim/scraper.py", line 1166, in make_json_files
    playlist_obj = generate_playlist_object(playlist)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/youtube2zim/scraper.py", line 1113, in generate_playlist_object
    videos[0]["contentDetails"]["videoId"]
    ~~~~~~^^^
IndexError: list index out of range

Looks like we did not handled the case where the playlist is expected to have a video, but for some reason it finishes empty.

@benoit74 benoit74 added the bug label Nov 1, 2024
@benoit74 benoit74 self-assigned this Nov 1, 2024
@benoit74 benoit74 added the regression Something was working is not working anymore label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug regression Something was working is not working anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant