Compare commits
2 commits
ce3b1349d9
...
4ae653f953
Author | SHA1 | Date | |
---|---|---|---|
|
4ae653f953 | ||
|
61741c9874 |
2 changed files with 124 additions and 0 deletions
57
proxylist
Normal file
57
proxylist
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
redirect.invidious.io
|
||||||
|
invidio.xamh.de
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
invidious.bachgau.social
|
||||||
|
inv.vern.cc
|
||||||
|
piped.sp-codes.de
|
||||||
|
invidious.kavin.rocks
|
||||||
|
invidious.snopyta.org
|
||||||
|
inv.bp.projectsegfau.lt
|
||||||
|
inv.privacy.com.de
|
||||||
|
inv.riverside.rocks
|
||||||
|
invidious.baczek.me
|
||||||
|
invidious.dhusch.de
|
||||||
|
invidious.flokinet.to
|
||||||
|
invidious.namazso.eu
|
||||||
|
invidious.nerdvpn.de
|
||||||
|
invidious.projectsegfau.lt
|
||||||
|
invidious.sethforprivacy.com
|
||||||
|
invidious.slipfox.xyz
|
||||||
|
invidious.tiekoetter.com
|
||||||
|
vid.puffyan.us
|
||||||
|
yewtu.be
|
||||||
|
youtube.076.ne.jp
|
||||||
|
yt.artemislena.eu
|
67
tuprox.py
Executable file
67
tuprox.py
Executable file
|
@ -0,0 +1,67 @@
|
||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
"""
|
||||||
|
Make it some easyer to find a working invidious instance.
|
||||||
|
You should have a file names proxylist with hostnames line per line
|
||||||
|
in your homedirectory.
|
||||||
|
Put the youtube-url into clipboard, call the script and paste the new urls into your chat.
|
||||||
|
The script reads the _clipboard_, does its work and puts the result
|
||||||
|
back into the clipboard
|
||||||
|
You should make a clicko in your desktoppanel.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os, sys, re, pyperclip, notify2
|
||||||
|
from random import randint
|
||||||
|
|
||||||
|
# look for a list of proxies at /home/user/proxylist
|
||||||
|
proxyfile_path = os.path.expanduser("~") + "/" + "proxylist"
|
||||||
|
proxy_list = []
|
||||||
|
|
||||||
|
# define browser. Firefox for president!
|
||||||
|
browser = "firefox"
|
||||||
|
browser_param = [" --new-tab "]
|
||||||
|
|
||||||
|
# Slurp in the proxylist
|
||||||
|
with open(proxyfile_path) as proxies:
|
||||||
|
for proxy in proxies:
|
||||||
|
proxy_list.append(proxy.rstrip())
|
||||||
|
|
||||||
|
new_urls = []
|
||||||
|
|
||||||
|
# Number of proxies in proxyfile
|
||||||
|
proxy_counter = len(proxy_list)
|
||||||
|
|
||||||
|
# Choose one by random
|
||||||
|
random_proxy = randint(0, proxy_counter - 1)
|
||||||
|
|
||||||
|
# Get the problematic url from clipboard
|
||||||
|
youtube_url = pyperclip.paste()
|
||||||
|
|
||||||
|
# do we have an accident without any url? My mouse is haunted...
|
||||||
|
if youtube_url.find("https://") == -1:
|
||||||
|
sys.exit("no Url found")
|
||||||
|
|
||||||
|
# or an accident with leading trash?
|
||||||
|
youtube_url = re.sub("^.*https://", "https://", youtube_url)
|
||||||
|
|
||||||
|
# make a list of urls with the replaced servers
|
||||||
|
# and print a list for convenience
|
||||||
|
for count in range(0, proxy_counter):
|
||||||
|
new_urls.append(re.sub("^.*://.*/", "https://" + proxy_list[count] + "/", youtube_url))
|
||||||
|
print(new_urls[count])
|
||||||
|
|
||||||
|
|
||||||
|
# put the chosen proxy into clipboard
|
||||||
|
|
||||||
|
pyperclip.copy(new_urls[random_proxy] + "\n")
|
||||||
|
|
||||||
|
# Send some notification to desktoptray
|
||||||
|
notify2.init(sys.argv[0])
|
||||||
|
n = notify2.Notification(new_urls[random_proxy], "").show()
|
||||||
|
notify2.uninit()
|
||||||
|
|
||||||
|
# execvp wants its parameters as a tuple
|
||||||
|
browser_param.append(new_urls[random_proxy])
|
||||||
|
|
||||||
|
# startup browser with a new tab
|
||||||
|
# os.execvp(browser, browser_param)
|
Loading…
Reference in a new issue