about summary refs log tree commit diff stats
path: root/src/instances/get_instances.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/instances/get_instances.py')
-rw-r--r--src/instances/get_instances.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/instances/get_instances.py b/src/instances/get_instances.py
index b47433ba..b2937d7e 100644
--- a/src/instances/get_instances.py
+++ b/src/instances/get_instances.py
@@ -381,14 +381,14 @@ for k1, v1 in mightyList.items():
     if type(mightyList[k1]) is dict:
         for k2, v2 in mightyList[k1].items():
             for instance in mightyList[k1][k2]:
-                # if (not isValid(instance)):
-                #     del mightyList[k1][k2][instance]
-                #     print("removed " + instance)
-                # else:
-                if not instance.endswith('.onion') and not instance.endswith('.i2p') and is_cloudflare(instance):
-                    blocklist.append(instance)
-                if not instance.endswith('.onion') and not instance.endswith('.i2p') and is_authenticate(instance):
-                    blocklist.append(instance)
+                if (not isValid(instance)):
+                    mightyList[k1][k2].pop(instance)
+                    print("removed " + instance)
+                else:
+                    if not instance.endswith('.onion') and not instance.endswith('.i2p') and is_cloudflare(instance):
+                        blocklist.append(instance)
+                    if not instance.endswith('.onion') and not instance.endswith('.i2p') and is_authenticate(instance):
+                        blocklist.append(instance)
 
 peertube()