Skip to main content

Make ZIM file from a Youtube channel, user or playlist(s)

Project description

Youtube2zim

CodeFactor License: GPL v3 PyPI version shields.io

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 and unzip to install JS dependencies. See get_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:

  1. Connect to Google Developers Console
  2. Create a new Project then Select it.
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youtube2zim-2.1.1.tar.gz (3.5 MB view details)

Uploaded Source

Built Distribution

youtube2zim-2.1.1-py3-none-any.whl (3.6 MB view details)

Uploaded Python 3

File details

Details for the file youtube2zim-2.1.1.tar.gz.

File metadata

  • Download URL: youtube2zim-2.1.1.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.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for youtube2zim-2.1.1.tar.gz
Algorithm Hash digest
SHA256 9fb687ddf30b625ea9348b376fe8822e88373e6f49aabcb582ae808140a0903f
MD5 1f3671ac79665d457edf11c4236603e7
BLAKE2b-256 4c2aa45ca7e6df7b3aad54ad9b6de6964ed117752ede1acaa6c035b2af828b06

See more details on using hashes here.

File details

Details for the file youtube2zim-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: youtube2zim-2.1.1-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.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for youtube2zim-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abdb279174b0c38ceb3cc6f5eaffe430da4a48e08db12e7e92e2e6d588b5196b
MD5 697407f85ce9ee2635478ccfbf22c1aa
BLAKE2b-256 2b908b4de1222b56c4c7bd22476477b204b6f5e0bd4d60a914ceeb83991ae502

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page