This commit is contained in:
ManeraKai 2022-04-10 16:08:35 +03:00
commit dd2b236faa
7 changed files with 53 additions and 34 deletions

12
package-lock.json generated
View File

@ -3937,9 +3937,9 @@
}
},
"node_modules/moment": {
"version": "2.29.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==",
"version": "2.29.2",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.2.tgz",
"integrity": "sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg==",
"dev": true,
"optional": true,
"engines": {
@ -9493,9 +9493,9 @@
"dev": true
},
"moment": {
"version": "2.29.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==",
"version": "2.29.2",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.2.tgz",
"integrity": "sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg==",
"dev": true,
"optional": true
},

View File

@ -8,6 +8,7 @@ import searchHelper from "./search.js";
import translateHelper from "./translate/translate.js";
import wikipediaHelper from "./wikipedia.js";
import localise from '../localise.js'
import sendTargetsHelper from "./sendTargets.js";
function getRandomInstance(instances) {
return instances[~~(instances.length * Math.random())];
@ -22,6 +23,7 @@ async function wholeInit() {
await searchHelper.init();
await wikipediaHelper.init();
await mediumHelper.init();
await sendTargetsHelper.init();
}
async function updateInstances() {
@ -55,6 +57,8 @@ async function updateInstances() {
mediumHelper.setRedirects(instances.scribe);
sendTargetsHelper.setRedirects(instances.send);
console.info("Successfully updated Instances");
return true;
}

View File

@ -147,4 +147,4 @@ export default {
isException,
init,
}
}

View File

@ -10,23 +10,7 @@ const targets = [
let redirects = {
"send": {
"normal": [
"https://send.silkky.cloud",
"https://send.turingpoint.de",
"https://send.ephemeral.land",
"https://send.monks.tools",
"https://send.jeugdhulp.be",
"https://send.aurorabilisim.com",
"https://nhanh.cloud",
"https://send.datahoarder.dev",
"https://send.navennec.net",
"https://fileupload.ggc-project.de",
"https://drop.chapril.org",
"https://files.psu.ru",
"https://send.portailpro.net",
"https://bytefile.de",
"https://transfer.acted.org ",
],
"normal": [],
"tor": []
}
}
@ -35,7 +19,8 @@ const getRedirects = () => redirects;
const getCustomRedirects = function () {
return {
"send": {
"normal": [...sendNormalRedirectsChecks, ...sendNormalCustomRedirects]
"normal": [...sendNormalRedirectsChecks, ...sendNormalCustomRedirects],
"tor": [...sendTorRedirectsChecks, ...sendTorCustomRedirects]
},
};
};
@ -173,6 +158,7 @@ async function init() {
protocol = r.sendTargetsProtocol ?? "normal";
//redirects.send = dataJson.send;
if (r.sendTargetsRedirects) redirects = r.sendTargetsRedirects;
sendNormalRedirectsChecks = r.sendNormalRedirectsChecks ?? [...redirects.send.normal];

View File

@ -91,11 +91,13 @@ let redirects = {
"https://piped.kavin.rocks",
"https://piped.silkky.cloud",
"https://piped.tokhmi.xyz",
"https://piped.mint.lgbt",
"https://piped.moomoo.me",
"https://il.ax",
"https://piped.syncpundit.com",
"https://piped.mha.fi",
"https://piped.mint.lgbt",
"https://piped.privacy.com.de",
"https://piped.notyourcomputer.net/"
"https://piped.notyourcomputer.net"
],
"tor": [
"http://piped2bbch4xslbl2ckr6k62q56kon56ffowxaqzy42ai22a4sash3ad.onion"
@ -850,4 +852,4 @@ export default {
setPipedMaterialRedirects,
init,
};
};

View File

@ -16,10 +16,10 @@
"https://inv.bp.mutahar.rocks",
"https://invidious.lunar.icu",
"https://invidious.mutahar.rocks",
"https://invidious.weblibre.org",
"https://invidious.esmailelbob.xyz",
"https://invidious.privacy.gd",
"https://invidious.esmailelbob.xyz",
"https://youtube.076.ne.jp",
"https://invidious.weblibre.org",
"https://invidious.namazso.eu"
],
"tor": [
@ -33,6 +33,26 @@
"http://2rorw2w54tr7jkasn53l5swbjnbvz3ubebhswscnc54yac6gmkxaeeqd.onion"
]
},
"send": {
"normal": [
"https://send.vis.ee",
"https://send.silkky.cloud",
"https://send.turingpoint.de",
"https://send.ephemeral.land",
"https://send.monks.tools",
"https://send.jeugdhulp.be",
"https://send.aurorabilisim.com",
"https://nhanh.cloud",
"https://send.datahoarder.dev",
"https://send.navennec.net",
"https://fileupload.ggc-project.de",
"https://drop.chapril.org",
"https://files.psu.ru",
"https://send.portailpro.net",
"https://bytefile.de",
"https://transfer.acted.org"
]
},
"nitter": {
"normal": [
"https://nitter.net",
@ -434,6 +454,7 @@
]
},
"peertube": [
"https://dalek.zone",
"https://video.sadmin.io",
"https://stream.jurnalfm.md",
"https://video.asgardius.company",
@ -509,7 +530,6 @@
"https://video.barcelo.cf",
"https://videotube.duckdns.org",
"https://peertube.1001solutions.net",
"https://peertube.razorserver.fr",
"https://tv.based.quest",
"https://peertube.beardedtek.com",
"https://casnocensure.site",
@ -975,7 +995,6 @@
"https://the.jokertv.eu",
"https://climatejustice.video",
"https://wikileaks.video",
"https://video.cnt.social",
"https://fair.tube",
"https://tube.lokad.com",
"https://videos.benjaminbrady.ie",
@ -1196,13 +1215,11 @@
"https://video.cigliola.com",
"https://xxx.noho.st",
"https://peertube.stefofficiel.me",
"https://video.eradicatinglove.xyz",
"https://canard.tube",
"https://videos.jordanwarne.xyz",
"https://tube.jeena.net",
"https://tube.cloud-libre.eu",
"https://videos.coletivos.org",
"https://peertube.nogafa.org",
"https://peertube.xwiki.com",
"https://tuvideo.encanarias.info",
"https://cinema.yunohost.support",

View File

@ -35,6 +35,16 @@ mightyList['invidious'] = invidiousList
print(Fore.GREEN + 'fetched ' + Style.RESET_ALL + 'Invidious')
# Send
r = requests.get('https://gitlab.com/timvisee/send-instances/-/raw/master/README.md')
tmp = re.findall(r"- ([-a-zA-Z0-9@:%_\+.~#?&//=]{2,}\.[a-z0-9]{2,}\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?)\)*\|*[A-Z]{0,}", r.text)
sendList = {}
sendList['normal'] = []
for item in tmp:
sendList['normal'].append(item)
mightyList['send'] = sendList
print('fetched Send')
# Nitter
r = requests.get('https://github.com/zedeus/nitter/wiki/Instances')
soup = BeautifulSoup(r.text, 'html.parser')