about summary refs log tree commit diff stats
path: root/src/instances
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2023-01-07 00:24:25 +0300
committerManeraKai <manerakai@protonmail.com>2023-01-07 00:24:25 +0300
commit868dccfb3b732d6862fa9d1e6aab2f651a9aa06e (patch)
treefef762a0e7ef7c4622263812d48544f10386bf81 /src/instances
parentRemoved Wikiless, Neuters. Optimization (diff)
downloadlibredirect-868dccfb3b732d6862fa9d1e6aab2f651a9aa06e.zip
Changed Update Instances selection mechanism. https://github.com/libredirect/libredirect/issues/334 Removed Peertube (maybe will readd it later). Optimized code
Diffstat (limited to 'src/instances')
-rwxr-xr-xsrc/instances/get_instances.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/instances/get_instances.py b/src/instances/get_instances.py
index 248f719a..7ae8948a 100755
--- a/src/instances/get_instances.py
+++ b/src/instances/get_instances.py
@@ -414,10 +414,6 @@ def librarian():
                   'https://codeberg.org/librarian/librarian/raw/branch/main/instances.json', 'url', True)
 
 
-def neuters():
-    fetchFromFile('neuters', 'Neuters')
-
-
 def beatbump():
     fetchFromFile('beatbump', 'Beatbump')
 
@@ -449,23 +445,6 @@ def privateBin():
     fetchJsonList('privateBin', 'PrivateBin',
                   'https://privatebin.info/directory/api?top=100&https_redirect=true&min_rating=A&csp_header=true&min_uptime=100&attachments=true', 'url', False)
 
-
-def peertube():
-    try:
-        r = requests.get(
-            'https://instances.joinpeertube.org/api/v1/instances?start=0&count=1045&sort=-createdAt', headers=headers)
-        rJson = json.loads(r.text)
-
-        myList = ['https://search.joinpeertube.org']
-        for k in rJson['data']:
-            myList.append('https://'+k['host'])
-
-        mightyList['peertube'] = myList
-        print(Fore.GREEN + 'Fetched ' + Style.RESET_ALL + 'PeerTube')
-    except Exception:
-        fetchCache('peertube', 'PeerTube')
-
-
 def isValid(url):  # This code is contributed by avanitrachhadiya2155
     try:
         result = urlparse(url)
@@ -495,7 +474,6 @@ whoogle()
 librex()
 rimgo()
 librarian()
-neuters()
 beatbump()
 hyperpipe()
 facil()
@@ -520,9 +498,6 @@ for k1, v1 in mightyList.items():
                         cloudflare.append(instance)
                     if not instance.endswith('.onion') and not instance.endswith('.i2p') and not instance.endswith('.loki') and is_authenticate(instance):
                         authenticate.append(instance)
-
-peertube()
-
 blacklist = {
     'cloudflare': cloudflare,
     'authenticate': authenticate,