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

View File

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

View File

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

View File

@ -10,23 +10,7 @@ const targets = [
let redirects = { let redirects = {
"send": { "send": {
"normal": [ "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 ",
],
"tor": [] "tor": []
} }
} }
@ -35,7 +19,8 @@ const getRedirects = () => redirects;
const getCustomRedirects = function () { const getCustomRedirects = function () {
return { return {
"send": { "send": {
"normal": [...sendNormalRedirectsChecks, ...sendNormalCustomRedirects] "normal": [...sendNormalRedirectsChecks, ...sendNormalCustomRedirects],
"tor": [...sendTorRedirectsChecks, ...sendTorCustomRedirects]
}, },
}; };
}; };
@ -173,6 +158,7 @@ async function init() {
protocol = r.sendTargetsProtocol ?? "normal"; protocol = r.sendTargetsProtocol ?? "normal";
//redirects.send = dataJson.send;
if (r.sendTargetsRedirects) redirects = r.sendTargetsRedirects; if (r.sendTargetsRedirects) redirects = r.sendTargetsRedirects;
sendNormalRedirectsChecks = r.sendNormalRedirectsChecks ?? [...redirects.send.normal]; sendNormalRedirectsChecks = r.sendNormalRedirectsChecks ?? [...redirects.send.normal];

View File

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

View File

@ -16,10 +16,10 @@
"https://inv.bp.mutahar.rocks", "https://inv.bp.mutahar.rocks",
"https://invidious.lunar.icu", "https://invidious.lunar.icu",
"https://invidious.mutahar.rocks", "https://invidious.mutahar.rocks",
"https://invidious.weblibre.org",
"https://invidious.esmailelbob.xyz",
"https://invidious.privacy.gd", "https://invidious.privacy.gd",
"https://invidious.esmailelbob.xyz",
"https://youtube.076.ne.jp", "https://youtube.076.ne.jp",
"https://invidious.weblibre.org",
"https://invidious.namazso.eu" "https://invidious.namazso.eu"
], ],
"tor": [ "tor": [
@ -33,6 +33,26 @@
"http://2rorw2w54tr7jkasn53l5swbjnbvz3ubebhswscnc54yac6gmkxaeeqd.onion" "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": { "nitter": {
"normal": [ "normal": [
"https://nitter.net", "https://nitter.net",
@ -434,6 +454,7 @@
] ]
}, },
"peertube": [ "peertube": [
"https://dalek.zone",
"https://video.sadmin.io", "https://video.sadmin.io",
"https://stream.jurnalfm.md", "https://stream.jurnalfm.md",
"https://video.asgardius.company", "https://video.asgardius.company",
@ -509,7 +530,6 @@
"https://video.barcelo.cf", "https://video.barcelo.cf",
"https://videotube.duckdns.org", "https://videotube.duckdns.org",
"https://peertube.1001solutions.net", "https://peertube.1001solutions.net",
"https://peertube.razorserver.fr",
"https://tv.based.quest", "https://tv.based.quest",
"https://peertube.beardedtek.com", "https://peertube.beardedtek.com",
"https://casnocensure.site", "https://casnocensure.site",
@ -975,7 +995,6 @@
"https://the.jokertv.eu", "https://the.jokertv.eu",
"https://climatejustice.video", "https://climatejustice.video",
"https://wikileaks.video", "https://wikileaks.video",
"https://video.cnt.social",
"https://fair.tube", "https://fair.tube",
"https://tube.lokad.com", "https://tube.lokad.com",
"https://videos.benjaminbrady.ie", "https://videos.benjaminbrady.ie",
@ -1196,13 +1215,11 @@
"https://video.cigliola.com", "https://video.cigliola.com",
"https://xxx.noho.st", "https://xxx.noho.st",
"https://peertube.stefofficiel.me", "https://peertube.stefofficiel.me",
"https://video.eradicatinglove.xyz",
"https://canard.tube", "https://canard.tube",
"https://videos.jordanwarne.xyz", "https://videos.jordanwarne.xyz",
"https://tube.jeena.net", "https://tube.jeena.net",
"https://tube.cloud-libre.eu", "https://tube.cloud-libre.eu",
"https://videos.coletivos.org", "https://videos.coletivos.org",
"https://peertube.nogafa.org",
"https://peertube.xwiki.com", "https://peertube.xwiki.com",
"https://tuvideo.encanarias.info", "https://tuvideo.encanarias.info",
"https://cinema.yunohost.support", "https://cinema.yunohost.support",

View File

@ -35,6 +35,16 @@ mightyList['invidious'] = invidiousList
print(Fore.GREEN + 'fetched ' + Style.RESET_ALL + 'Invidious') 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 # Nitter
r = requests.get('https://github.com/zedeus/nitter/wiki/Instances') r = requests.get('https://github.com/zedeus/nitter/wiki/Instances')
soup = BeautifulSoup(r.text, 'html.parser') soup = BeautifulSoup(r.text, 'html.parser')