openzim / youtube

Create a ZIM file from a Youtube channel/username/playlist
GNU General Public License v3.0
43 stars 26 forks source link

Crash on missing branding #130

Closed rgaudin closed 3 years ago

rgaudin commented 3 years ago

This zimfarm run failed on a missing image in branding. We used to receive a placeholder from google on missing branding before I believe so maybe something has changed…

[youtube2zim::2020-10-30 14:49:15,992] INFO:download all author's profile pictures
[youtube2zim::2020-10-30 14:49:15,993] DEBUG:query youtube-api for Channel #UC8hgx5hCiyDmO3UeBl95_1Q
[youtube2zim::2020-10-30 14:49:17,146] INFO:update general metadata
[youtube2zim::2020-10-30 14:49:17,147] ERROR:FAILED. An error occurred: 'image'
[youtube2zim::2020-10-30 14:49:17,147] ERROR:'image'
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/youtube2zim-2.1.10-py3.8.egg/youtube2zim/entrypoint.py", line 202, in main
    scraper.run()
  File "/usr/local/lib/python3.8/site-packages/youtube2zim-2.1.10-py3.8.egg/youtube2zim/scraper.py", line 310, in run
    self.update_metadata()
  File "/usr/local/lib/python3.8/site-packages/youtube2zim-2.1.10-py3.8.egg/youtube2zim/scraper.py", line 719, in update_metadata
    save_channel_branding(self.channels_dir, self.main_channel_id, save_banner=True)
  File "/usr/local/lib/python3.8/site-packages/youtube2zim-2.1.10-py3.8.egg/youtube2zim/youtube.py", line 275, in save_channel_branding
    banner = channel_json["brandingSettings"]["image"]["bannerImageUrl"]
KeyError: 'image'
kelson42 commented 3 years ago

@rgaudin @satyamtg It fails now for the Mali ZIM file: https://farm.openzim.org/pipeline/5fae194b6ed515d50495f252/debug

May we have relatively quickly a fix please?