about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2022-04-10 16:08:35 +0300
committerManeraKai <manerakai@protonmail.com>2022-04-10 16:08:35 +0300
commitdd2b236faade7256f798847dd6e88c90cc088182 (patch)
treeaa17f61e0d41d9db3fe6377553e24c1361fea33c /src
parentFixed imgur regex #180 (diff)
parentRearranged Order of Instances (#181) (diff)
downloadlibredirect-dd2b236faade7256f798847dd6e88c90cc088182.zip
Merge branch 'master' of https://github.com/libredirect/libredirect
Diffstat (limited to 'src')
-rw-r--r--src/assets/javascripts/helpers/common.js4
-rw-r--r--src/assets/javascripts/helpers/general.js2
-rw-r--r--src/assets/javascripts/helpers/sendTargets.js22
-rw-r--r--src/assets/javascripts/helpers/youtube/youtube.js8
-rw-r--r--src/instances/data.json29
-rw-r--r--src/instances/get_instances.py10
6 files changed, 47 insertions, 28 deletions
diff --git a/src/assets/javascripts/helpers/common.js b/src/assets/javascripts/helpers/common.js
index 678b9dd5..50180497 100644
--- a/src/assets/javascripts/helpers/common.js
+++ b/src/assets/javascripts/helpers/common.js
@@ -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;
   }
diff --git a/src/assets/javascripts/helpers/general.js b/src/assets/javascripts/helpers/general.js
index 67c8b57b..1ee6bcf5 100644
--- a/src/assets/javascripts/helpers/general.js
+++ b/src/assets/javascripts/helpers/general.js
@@ -147,4 +147,4 @@ export default {
 
     isException,
     init,
-}
\ No newline at end of file
+}
diff --git a/src/assets/javascripts/helpers/sendTargets.js b/src/assets/javascripts/helpers/sendTargets.js
index 8cfca7bb..5b6d4201 100644
--- a/src/assets/javascripts/helpers/sendTargets.js
+++ b/src/assets/javascripts/helpers/sendTargets.js
@@ -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];
diff --git a/src/assets/javascripts/helpers/youtube/youtube.js b/src/assets/javascripts/helpers/youtube/youtube.js
index a4b6d38e..c2d541e5 100644
--- a/src/assets/javascripts/helpers/youtube/youtube.js
+++ b/src/assets/javascripts/helpers/youtube/youtube.js
@@ -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,
-};
\ No newline at end of file
+};
diff --git a/src/instances/data.json b/src/instances/data.json
index 079bc7a6..7eecdae1 100644
--- a/src/instances/data.json
+++ b/src/instances/data.json
@@ -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",
diff --git a/src/instances/get_instances.py b/src/instances/get_instances.py
index 4fe3bc9c..790cd25b 100644
--- a/src/instances/get_instances.py
+++ b/src/instances/get_instances.py
@@ -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')