Rotate SOCKS5 proxies for youtube-dl with less manual effort. Never forget that youtube is a walled garden, not public infrastructure, and server-based "streaming" only ever makes sense for live media.
Your Name ca11b8cfc8 Always treat ERROR: as errors, even unknown ones | 4 anni fa | |
---|---|---|
README.md | 4 anni fa | |
filter_for_success.py | 4 anni fa | |
scraper.py | 4 anni fa | |
unblockcentral.py | 4 anni fa |
Install tor, proxychains and youtube-dl. Make sure tor client is running. Install ipcqueue
python module.
Get your copy of unblockcentral.py and fill cands.json
with some SOCKS5 proxies:
... > cands.json
Start a worker process
python3 unblockcentral.py
To download video
python3 unblockcentral.py -V 'https://www.youtube.com/watch?v=foobarbuzzx'
To download audio and convert to opus
python3 unblockcentral.py -A 'https://www.youtube.com/watch?v=foobarbuzzx'
Never connect directly to anything over the spy-net if you can help it. Therefore, use Tor. On the other end, you may use a VPN service, not least because censorship and discrimination against Tor users is not infrequent. And sometimes open SOCKS5 proxies are helpful, in a limited way.
Unfortunately, much valuable "content" is still uploaded to the walled garden youtube. While the walled garden is not locked AT THE MOMENT, make no mistake -- we treat it as a library but it is not. It is part of a surveillance capitalist empire, Alphabet corp, and as such a potential single point of failure. It could close down anytime, destroying the treasures it contains.
Also, youtube is useless without a download tool. youtube-dl is a versatile download tool, but youtube has started throttling access from IP addresses that cause a lot of traffic (not a lot by google's standards, if they were honest they'd admit that, but so much that they can't use it for tracking anymore) such as tor exits. (Side note: using the web without tor isn't a good idea anymore).
One way to circumvent this and download streams anonymously anyway -- flawed, but often sufficient -- is by using further SOCKS5 proxies behind tor. If they are open or used by too many people, they get blocked too. That's a bit annoying if all you want is download that lecture or music track for offline use. This is why I'm creating this little program to reduce the manual effort needed to rotate the proxies.
Improve safety. Persist state. Make user friendly. Do a nice web UI. Rely even less on manual control. Automatically fetch lists of suitable proxies (done). Provide proxies dynamically (sketched but not yet implemented, atm you must edit the script).