Compare commits

...

2 commits

Author SHA1 Message Date
Wolfgang Nowak
4ae653f953 proxylist Liste der Proxies 2023-10-29 10:20:39 +01:00
Wolfgang Nowak
61741c9874 tuprox.py 1.0
proxylist 1.0
2023-10-29 10:19:21 +01:00
2 changed files with 124 additions and 0 deletions

57
proxylist Normal file
View 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
View 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)