Fixed wikipedia mobile not redirecting #196. Improved Instances Fetching Script
This commit is contained in:
parent
7cc326eb65
commit
d0c4a7b1e6
|
@ -2,7 +2,7 @@ window.browser = window.browser || window.chrome;
|
|||
|
||||
import commonHelper from './common.js'
|
||||
|
||||
const targets = /^https?:\/{2}([a-z]{1,}\.|)wikipedia\.org/
|
||||
const targets = /^https?:\/{2}(([a-z]{1,}\.){0,})wikipedia\.org/
|
||||
|
||||
let redirects = {
|
||||
"wikiless": {
|
||||
|
|
|
@ -341,13 +341,13 @@
|
|||
"https://search.st8.at",
|
||||
"https://search.stinpriza.org",
|
||||
"https://search.trom.tf",
|
||||
"https://search.vojkovic.xyz",
|
||||
"https://search.zdechov.net",
|
||||
"https://searx.bissisoft.com",
|
||||
"https://searx.divided-by-zero.eu",
|
||||
"https://searx.dresden.network",
|
||||
"https://searx.everdot.org",
|
||||
"https://searx.fossencdi.org",
|
||||
"https://searx.gnous.eu",
|
||||
"https://searx.gnu.style",
|
||||
"https://searx.hardwired.link",
|
||||
"https://searx.josie.lol",
|
||||
|
@ -412,12 +412,12 @@
|
|||
"https://search.mdosch.de",
|
||||
"https://search.neet.works",
|
||||
"https://search.ononoki.org",
|
||||
"https://search.vojkovic.xyz",
|
||||
"https://search.zzls.xyz",
|
||||
"https://searx.be",
|
||||
"https://searx.ebnar.xyz",
|
||||
"https://searx.esmailelbob.xyz",
|
||||
"https://searx.fmac.xyz",
|
||||
"https://searx.gnous.eu",
|
||||
"https://searx.mha.fi",
|
||||
"https://searx.namejeff.xyz",
|
||||
"https://searx.prvcy.eu",
|
||||
|
@ -480,7 +480,6 @@
|
|||
"https://watch.riverside.rocks",
|
||||
"https://peer.galaxycrow.de",
|
||||
"https://sharetube.us",
|
||||
"https://dalek.zone",
|
||||
"https://video.sadmin.io",
|
||||
"https://stream.jurnalfm.md",
|
||||
"https://video.asgardius.company",
|
||||
|
@ -554,7 +553,6 @@
|
|||
"https://docker.videos.lecygnenoir.info",
|
||||
"https://video.barcelo.cf",
|
||||
"https://videotube.duckdns.org",
|
||||
"https://peertube.1001solutions.net",
|
||||
"https://tv.based.quest",
|
||||
"https://peertube.beardedtek.com",
|
||||
"https://casnocensure.site",
|
||||
|
|
|
@ -6,6 +6,7 @@ from urllib.parse import urlparse
|
|||
from bs4 import BeautifulSoup
|
||||
import re
|
||||
from colorama import Fore, Back, Style
|
||||
from urllib.parse import urlparse
|
||||
|
||||
mightyList = {}
|
||||
|
||||
|
@ -278,7 +279,11 @@ print(Fore.GREEN + 'Fetched ' + Style.RESET_ALL + 'Peertube')
|
|||
|
||||
|
||||
def isValid(url): # This code is contributed by avanitrachhadiya2155
|
||||
return re.search(r"([-a-zA-Z0-9@:%_\+.~#?&//=]{2,}\.[a-z0-9]{2,}\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?)\)*\|*[A-Z]{0,}", url)
|
||||
try:
|
||||
result = urlparse(url)
|
||||
return all([result.scheme, result.netloc, result.path])
|
||||
except:
|
||||
return False
|
||||
|
||||
|
||||
for k1, v1 in mightyList.items():
|
||||
|
|
Loading…
Reference in New Issue