Fork of youtube-local
yt-local is a browser-based client written in Python for watching Youtube anonymously and without the lag of the slow page used by Youtube. One of the primary features is that all requests are routed through Tor, except for the video file at googlevideo.com. This is analogous to what HookTube (defunct) and Invidious do, except that you do not have to trust a third-party to respect your privacy. The assumption here is that Google won't put the effort in to incorporate the video file requests into their tracking, as it's not worth pursuing the incredibly small number of users who care about privacy (Tor video routing is also provided as an option). Tor has high latency, so this will not be as fast network-wise as regular Youtube. However, using Tor is optional; when not routing through Tor, video pages may load faster than they do with Youtube's page depending on your browser.
The Youtube API is not used, so no keys or anything are needed. It uses the same requests as the Youtube webpage.
Download the zip file under the Releases page. Unzip it anywhere you choose.
Download the tarball under the Releases page and extract it.
cd into the directory and run
virtualenv -p python3 venv
pip install -r requirements.txt
Note: If pip isn't installed, first try installing it from your package manager. Make sure you install pip for python 3. For example, the package you need on debian is python3-pip rather than python-pip. If your package manager doesn't provide it, try to install it according to this answer, but make sure you run
python3 get-pip.py instead of
Firstly, if you wish to run this in portable mode, create the empty file "settings.txt" in the program's main directory. If the file is there, settings and data will be stored in the same directory as the program. Otherwise, settings and data will be stored in
C:\Users\[your username]\.youtube-local on Windows and
~/.youtube-local on GNU+Linux/MacOS.
To run the program on windows, open
run.bat. On GNU+Linux/MacOS, run
Access youtube URLs by prefixing them with
http://localhost:8080/, For instance,
You can use an addon such as Redirector (Firefox|Chrome) to automatically redirect Youtube URLs to yt-local. I use the include pattern
^(https?://(?:[a-zA-Z0-9_-]*\.)?(?:youtube\.com|youtu\.be|youtube-nocookie\.com)/.*) and the redirect pattern
http://localhost:8080/$1 (Make sure you're using regular expression mode).
If you want embeds on the web to also redirect to yt-local, make sure "Iframes" is checked under advanced options in your redirector rule. Check test
yt-local can be added as a search engine in firefox to make searching more convenient. See here for information on firefox search plugins.
In the settings page, set "Route Tor" to "On, except video" (the second option). Be sure to save the settings.
Ensure Tor is listening for Socks5 connections on port 9150 (a simple way to accomplish this is by opening the Tor Browser Bundle and leaving it open). Your connections should now be routed through Tor.
If you wish to route the video through Tor, set "Route Tor" to "On, including video". Because this is bandwidth-intensive, you are strongly encouraged to donate to the consortium of Tor node operators. For instance, donations to NoiseTor go straight towards funding nodes. Using their numbers for bandwidth costs, together with an average of 485 kbit/sec for a diverse sample of videos, and assuming n hours of video watched per day, gives $0.03n/month. A $1/month donation will be a very generous amount to not only offset losses, but help keep the network healthy.
YouTube and YouTube Music/subscriptions/subscriptions.json
Pull requests and issues are welcome
For coding guidelines and an overview of the software architecture, see the HACKING.md file.
This project is licensed under the GNU Affero General Public License v3 (GNU AGPLv3) or any later version.
Permission is hereby granted to the youtube-dl project at https://github.com/ytdl-org/youtube-dl to relicense any portion of this software under the Unlicense, public domain, or whichever license is in use by youtube-dl at the time of relicensing, for the purpose of inclusion of said portion into youtube-dl. Relicensing permission is not granted for any purpose outside of direct inclusion into the official repository of youtube-dl. If inclusion happens during the process of a pull-request, relicensing happens at the moment the pull request is merged into youtube-dl; until that moment, any cloned repositories of youtube-dl which make use of this software are subject to the terms of the GNU AGPLv3.
This project is completely free/Libre and will always be.