Closed satyamtg closed 4 years ago
Thanks I think we should reorg code a bit as this method is becoming unreadable.
Added two methods, download_video()
and download_thumbnail()
, to download those seperately
Moved process_thumbnail()
to processing.py
module
Good. Can be simplified a bit (see comments in thumbnail and apply to video as well)
Hm. I wonder why I didn't saw those. Fixed them anyways.
There are multiple left over files (broken JPEG) regarding thumbnails… what's going on?
This was apparently due to the configuration option we pass to youtube_dl
, i.e. write_all_thumbnails
. Setting it to False
did the trick. The rebase is only for fixing merge conflict in CHANGELOG.md
I have added a function to download subtitles. Also bumped scraperlib requirement to 1.3.4 because it requires https://github.com/openzim/python_scraperlib/pull/65 to correctly handle thumbnails which are often downloaded with wrong extensions by youtube_dl.
This allows using WebP for thumbnails with optimization and S3 cache support. Also applies the same CSS tweaks (alongwith webp-hero) and fixes #91 as a result.
This does the following chages -
processing.py
todownload_video_files_batch()
inscraper.py
in the form of a functionprocess_thumbnail()
.