Make ZIM file from a Youtube channel, user or playlist(s)
Project description
Youtube2zim
youtube2zim
allows you to create a ZIM file from a Youtube Channel/username or one-or-more Playlists.
It downloads the video (webm or mp4 format – optionnaly recompress them in lower-quality, smaller size), the thumbnails, the subtitles and the authors' profile pictures ; then, it create a static HTML files folder of it before creating a ZIM off of it.
Requirements
ffmpeg
for video transcoding (only used with--lower-quality
).zimwriterfs
for ZIM file packaging. Use--no-zim
to skip this step.curl
andunzip
to install JS dependencies. Seeget_js_deps.sh
if you want to do it manually.
Installation
youtube2zim
is a python program. if you are not using the docker image, you are advised to use it in a virtualenv. See requirements.txt
for the list of python dependencies.
docker
docker run -v my_dir:/output openzim/youtube youtube2zim --help
pip
pip install youtube2zim
youtube2zim --help
Usage
youtube2zim
uses Youtube API v3 to fetch data from Youtube. You thus need to provide an API_KEY
to use the scraper.
To get an API:
- Connect to Google Developers Console
- Create a new Project then Select it.
- When asked, choose Create Credentials and select the API Key type. (Credentials page)
youtube2zim --api-key "<your-api-key>" --type user --id "Vsauce"
Notes
- Your API_KEY is subject to usage quotas (10,000 requests/day) so use
--only_test_branding
when adjusting parameters and branding to not waste your quota. - On macOS, the locale setting is buggy. You need to launch it with
LANGUAGE
environment variable (as ISO-639-1) for the translations to work.
LANGUAGE=fr youtube2zim --language fra
Development
See CONTRIBUTING.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for youtube2zim-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1056c27c57b8713139b5a39dccd27b4b272f9e881308a0fc3c468b5f67beeacb |
|
MD5 | 24c3167c9c43a6de34b138587fa875cf |
|
BLAKE2b-256 | 9747bb0bbc72b7a3b371d26b97dbedeb07a1cf2a0b8c89f983db3b13c15e5ef7 |