Skip to main content

ytsnap

Fast and independent YouTube video downloader built from scratch.

Installation

pip install ytsnap

CLI Usage

# Basic download
ytsnap "https://www.youtube.com/watch?v=VIDEO_ID"

# Custom output filename
ytsnap "https://www.youtube.com/watch?v=VIDEO_ID" output.mp4

# Download specific quality
ytsnap "https://www.youtube.com/watch?v=VIDEO_ID" video.mp4 --quality 720p

# Download by itag
ytsnap "https://www.youtube.com/watch?v=VIDEO_ID" video.mp4 --itag 18

Library Usage

from youtube_downloader import YouTubeDownloader

# Initialize downloader
downloader = YouTubeDownloader("https://www.youtube.com/watch?v=VIDEO_ID")

# Get available formats
formats = downloader.get_formats()
for fmt in formats:
    print(f"itag={fmt['itag']} quality={fmt['quality']} size={fmt['filesize']}")

# Download video (auto-selects best format)
downloader.download("video.mp4")

# Download specific quality
downloader.download("video_720p.mp4", quality="720p")

# Download by itag
downloader.download("video.mp4", itag=18)

Features

  • ✅ No yt-dlp dependency
  • ✅ Uses YouTube's innertube API
  • ✅ Multiple quality options
  • ✅ Progress tracking
  • ✅ Both CLI and library usage
  • ✅ Video and audio formats
  • ✅ Fast and lightweight

How it works

Uses YouTube's official innertube API with Android client credentials to fetch direct CDN URLs without signature decryption complexity.

License

MIT

Release files for ytsnap 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ytsnap 0.1.0
File Size Uploaded
ytsnap-0.1.0.tar.gz 8.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ytsnap 0.1.0
File Interpreter ABI Platform
ytsnap-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 MB

Release files / ytsnap-0.1.0.tar.gz

Download URL ytsnap-0.1.0.tar.gz
Size 8.7 MB
Tags Source
SHA-256 checksum
How to use checksums
11554bf861038b3a8df3b9520282b54e73ef28e1847d1b133dcb10c770e08ed0
BLAKE2b-256 checksum
How to use checksums
c9ff8d294ad2769f7f922a0c8f67225d6b801de4a1461f2e9f40c46bd5c930e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / ytsnap-0.1.0-py3-none-any.whl

Download URL ytsnap-0.1.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
559c91d339573bac6596be4b256970072fa2c9d5d23aeaa7dc130280dcda0881
BLAKE2b-256 checksum
How to use checksums
01f34c2961ad4a309a4b71754ac9050f1c06b7468eadb39b0d300b37462ad2c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page