gitmyhub

you-get

Python ★ 57k updated 1mo ago

:arrow_double_down: Dumb downloader that scrapes the web

A Python command-line tool that downloads videos, audio, and images from websites like YouTube and Bilibili by extracting the actual media stream URLs your browser uses.

PythonFFmpegRTMPDumpsetup: easycomplexity 2/5

You-Get is a lightweight Python command-line utility for downloading media — videos, audio, and images — from websites when there is no other convenient way to save them locally. You paste a URL from a supported platform like YouTube, Niconico, Bilibili, Youku, or dozens of others, run you-get , and the file is saved to your current directory.

The problem it addresses is simple: many websites deliberately prevent you from saving content you are watching, even though nothing technically stops you from doing so. You-Get bypasses this by scraping the page's source, locating the actual media stream URLs that the browser would have fetched anyway, and downloading them directly.

How it works is that you-get sends HTTP requests to the target page, parses the HTML and JavaScript to extract video or audio stream URLs, and then downloads those streams to disk. For videos that come in multiple quality levels, you can run you-get -i first to see all available formats and resolutions before choosing which to download. Some sites require authentication (like downloading your own private videos), which you can pass via cookies or login options. You can also stream directly to a media player like mpv or VLC instead of saving to disk.

You would use you-get when you want to keep a local copy of a video for offline viewing, when you want to avoid ads by playing the raw stream in a standalone media player, or when you want to bulk-download images from a gallery page. It also handles downloading arbitrary binary files from URLs.

The tech stack is Python 3 and it optionally depends on FFmpeg for merging video and audio streams that are delivered separately (common on YouTube) and RTMPDump for flash-based streams. It is distributed via pip and also available via Homebrew on macOS.

Where it fits