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
extension – 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 Javascript dependencies. Seeget_js_deps.sh
if you want to do it manually.
Installation
Here comes a few different ways to install youtube2zim
.
Virtualenv
youtube2zim
is a Python3 software. If you are not using the
Docker image, you are advised to use it in a
virtualenv to avoid installing software
dependences on your system.
virtualenv -p python3 ./ # Create virtualenv
source bin/activate # Activate the virtualenv
pip3 install youtube2zim # Install dependencies
youtube2zim --help # Display youtube2zim help
At the end, call deactivate
to quit the virtual environment.
See requirements.txt
for the list of python dependencies.
Docker
docker run -v my_dir:/output openzim/youtube youtube2zim --help
Globally (on GNU/Linux)
sudo pip3 install -U youtube2zim
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
Before contributing be sure to check out the CONTRIBUTING.md guidelines.
License
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
File details
Details for the file youtube2zim-2.1.5.tar.gz
.
File metadata
- Download URL: youtube2zim-2.1.5.tar.gz
- Upload date:
- Size: 3.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38c3e08ddc41fcbfcd61398e9f649a08859fc2e1c433393de6b29f8c1d69761d |
|
MD5 | cbbf18d405294963ba5f324ea80f26f9 |
|
BLAKE2b-256 | 5cda188f19703d7e3e7b4f2d1e56418296bac3fcca414891f93cf47779e1e249 |
File details
Details for the file youtube2zim-2.1.5-py3-none-any.whl
.
File metadata
- Download URL: youtube2zim-2.1.5-py3-none-any.whl
- Upload date:
- Size: 3.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 496fa0e03865bda8666c8299ef2fadfe97c3f732776ecbab4a07745e094760dd |
|
MD5 | 80fbb5611f6dd42a677587cc30fb9202 |
|
BLAKE2b-256 | 122247fa6ba8e069b772afafd4c116b94add4ab3ac4d382ad0df20e6f3441db8 |