about summary refs log tree commit diff stats
path: root/src/instances/get_instances.py
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2022-04-13 20:21:51 +0300
committerManeraKai <manerakai@protonmail.com>2022-04-13 20:21:51 +0300
commit7123f7fe27189671277c58ce6bf27c65329926e5 (patch)
tree110ddcfbfbd0b58013e7f3532a2a15c0afe77456 /src/instances/get_instances.py
parentAdded Nitter settings #138 (diff)
parentI2P support for search, Imgur and Wikipedia (#189) (diff)
downloadlibredirect-7123f7fe27189671277c58ce6bf27c65329926e5.zip
Merge branch 'master' of https://github.com/libredirect/libredirect
Diffstat (limited to 'src/instances/get_instances.py')
-rw-r--r--src/instances/get_instances.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/instances/get_instances.py b/src/instances/get_instances.py
index 0d4c9a67..d0c325c2 100644
--- a/src/instances/get_instances.py
+++ b/src/instances/get_instances.py
@@ -231,8 +231,14 @@ tmpList = r.text.strip().split('\n')
 whoogleList = {}
 whoogleList['normal'] = []
 whoogleList['tor'] = []
+whoogleList['i2p'] = []
 for item in tmpList:
-    whoogleList['normal'].append(item)
+    if item.endswith('.onion'):
+        whoogleList['tor'].append(item)
+    elif item.endswith('.i2p'):
+        whoogleList['i2p'].append(item)
+    else:
+        whoogleList['normal'].append(item)
 mightyList['whoogle'] = whoogleList
 print(Fore.GREEN + 'fetched ' + Style.RESET_ALL + 'Whoogle')
 
@@ -243,10 +249,12 @@ rJson = json.loads(r.text)
 rimgoList = {}
 rimgoList['normal'] = []
 rimgoList['tor'] = []
-
+rimgoList['i2p'] = []
 for item in rJson:
     if item.endswith('.onion'):
         rimgoList['tor'].append('http://' + item)
+    elif item.endswith('.i2p'):
+        rimgoList['i2p'].append('http://' + item)
     else:
         rimgoList['normal'].append('https://' + item)
 mightyList['rimgo'] = rimgoList