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. 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.
Go to your Downloads folder, open a terminal, and run this command:
git clone https://git.sr.ht/~heckyel/yt-local
or if you dont have git installed,
Then download latest release .tar.gz save it to your download’s folder extract it and rename it to: yt-local: heckyel's website
Commands to run in the Terminal. I’m on Windows, so I’ll be using PowerShell.
1.
cd yt-local
2.
python3 -m venv venv
or: virtualenv -p python3 venv
3.
.\venv\Scripts\activate
or: source venv/bin/activate
4.
pip install -r requirements.txt
5.
python server.py
6.
Open the link displayed in your terminal by holding ctrl and clicking:
Now everytime you want to use yt-local you will need to go inside yt-local directory and run these two commands:
1.
.\venv\Scripts\activate
2.
python server.py
Below is a shortcut to launch yt-local without needing to open the terminal every time you want to open up YouTube locally. Just create a new file yt-local.bat on your desktop, right-click, then edit and paste the command below, or simply download the .bat file.
@echo off
start /min firefox http://localhost:9010/
timeout /t 1.5 >nul
start /min powershell.exe -Command "Set-Location \"$env:userprofile\Downloads\yt-local\venv\Scripts\"; Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass; .\activate; pip install gevent; cd \"$env:userprofile\Downloads\yt-local\"; python server.py"
exit
yt-local.bat:
for Linux
start-yt-local.sh #!/bin/bash
source ~/Downloads/yt-local/venv/bin/activate
cd ~/Downloads/yt-local || exit
python server.py &
sleep 1.5
firefox http://localhost:9010/
chmod +x start-yt-local.sh
./start-yt-local.sh
• Chrome's Redirector Extension
• Firefox's Redirector Extension
Description:
redirect Youtube
Example URL:
https://www.youtube.com/watch?v=eB6txyhHFF4
Include pattern:
^(https?://(?:[a-zA-Z0-9_-]*\.)?(?:youtube\.com|youtu\.be|youtube-nocookie\.com)/.*)
Redirect to:
http://localhost:9010/$1
Pattern type:
🔵 Regular Expression
Pattern Description:
yt-local redirect
Example result:
http://localhost:9010/https://www.youtube.com/watch?v=eB6txyhHFF4
Tor, short for “The Onion Router,” is a privacy-focused network that aims to increase users’ anonymity online. It works by routing internet traffic through a series of encrypted relays, thus obscuring the origin and destination of the data.
Once in YT Local settings enable Route Tor: On, except video. Double check these networking settings and click save settings at the bottom of the page:
Download the Tor Browser if you haven’t done so already:
•
torproject.org
Once Installed navigate to the Tor browser’s directory Tor:
C:\Users\yourUsername\Desktop\Tor Browser\Browser\TorBrowser\Tor
Open a terminal and run this command:
.\tor.exe SOCKSPort 9050 ControlPort 9151 | more
Now open your browser settings (mine is Firefox) and search for proxy settings (It’s the last option under Network Settings in Firefox. Configure how Firefox connects to the internet).
You can double check that you correctly applied proxy settings by checking the public ip address of your browser by navigating to:
or
and curl ifconfig.me command from your terminal. The IP address should be different for your configured browser.
(Don’t forget to disable the proxy setting in your browser if you’re not using Tor; otherwise, normal website pages will not load.)
yt-local offers a unique way to watch YouTube anonymously and without the typical lag. By routing requests through Tor and hosting videos locally, it provides a faster and more private YouTube experience. With the added convenience of a Windows shortcut and browser redirector extension, accessing your locally hosted YouTube becomes even more seamless.