No more trailing slashes
This commit is contained in:
parent
21000150ca
commit
981662fa4b
|
@ -14,13 +14,17 @@ mightyList = {}
|
||||||
|
|
||||||
|
|
||||||
def filterLastSlash(urlList):
|
def filterLastSlash(urlList):
|
||||||
tmp = []
|
tmp = {}
|
||||||
for i in urlList:
|
for x in urlList:
|
||||||
if i.endswith('/'):
|
tmp[x] = {}
|
||||||
tmp.append(i[:-1])
|
for y in urlList[x]:
|
||||||
print(Fore.YELLOW + "Fixed " + Style.RESET_ALL + i)
|
tmp[x][y] = []
|
||||||
else:
|
for z in urlList[x][y]:
|
||||||
tmp.append(i)
|
if z.endswith('/'):
|
||||||
|
tmp[x][y].append(z[:-1])
|
||||||
|
print(Fore.YELLOW + "Fixed " + Style.RESET_ALL + z)
|
||||||
|
else:
|
||||||
|
tmp[x][y].append(z)
|
||||||
return tmp
|
return tmp
|
||||||
|
|
||||||
|
|
||||||
|
@ -177,7 +181,6 @@ def libreddit():
|
||||||
tmp = re.findall(
|
tmp = re.findall(
|
||||||
r"\| \[.*\]\(([-a-zA-Z0-9@:%_\+.~#?&//=]{2,}\.[a-z]{2,}\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?)\)*\|*[A-Z]{0,}.*\|.*\|", r.text)
|
r"\| \[.*\]\(([-a-zA-Z0-9@:%_\+.~#?&//=]{2,}\.[a-z]{2,}\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?)\)*\|*[A-Z]{0,}.*\|.*\|", r.text)
|
||||||
|
|
||||||
tmp = filterLastSlash(tmp)
|
|
||||||
|
|
||||||
for item in tmp:
|
for item in tmp:
|
||||||
if item.endswith('.onion'):
|
if item.endswith('.onion'):
|
||||||
|
@ -249,7 +252,6 @@ def quetre():
|
||||||
tmp = re.findall(
|
tmp = re.findall(
|
||||||
r"\| \[.*\]\(([-a-zA-Z0-9@:%_\+.~#?&//=]{2,}\.[a-z]{2,}\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?)\)*\|*[A-Z]{0,}.*\|.*\|", r.text)
|
r"\| \[.*\]\(([-a-zA-Z0-9@:%_\+.~#?&//=]{2,}\.[a-z]{2,}\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?)\)*\|*[A-Z]{0,}.*\|.*\|", r.text)
|
||||||
|
|
||||||
tmp = filterLastSlash(tmp)
|
|
||||||
|
|
||||||
for item in tmp:
|
for item in tmp:
|
||||||
if item.endswith('.onion'):
|
if item.endswith('.onion'):
|
||||||
|
@ -270,7 +272,6 @@ def libremdb():
|
||||||
tmp = re.findall(
|
tmp = re.findall(
|
||||||
r"\| ([-a-zA-Z0-9@:%_\+.~#?&//=]{2,}\.[a-z]{2,}\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?)*\|*[A-Z]{0,}.*\|.*\|", r.text)
|
r"\| ([-a-zA-Z0-9@:%_\+.~#?&//=]{2,}\.[a-z]{2,}\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?)*\|*[A-Z]{0,}.*\|.*\|", r.text)
|
||||||
|
|
||||||
tmp = filterLastSlash(tmp)
|
|
||||||
|
|
||||||
for item in tmp:
|
for item in tmp:
|
||||||
if item.strip() == "":
|
if item.strip() == "":
|
||||||
|
@ -433,6 +434,7 @@ linvgatranslate()
|
||||||
searx_searxng()
|
searx_searxng()
|
||||||
whoogle()
|
whoogle()
|
||||||
rimgo()
|
rimgo()
|
||||||
|
mightyList = filterLastSlash(mightyList)
|
||||||
|
|
||||||
cloudflare = []
|
cloudflare = []
|
||||||
authenticate = []
|
authenticate = []
|
||||||
|
|
Loading…
Reference in New Issue