From: Mint <> Date: Sun, 4 Dec 2022 14:14:21 +0000 (+0300) Subject: Blacklist certain domains (thanks, lamp) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e6492a924658a97002b1646301a83d496c218761;p=fba.git Blacklist certain domains (thanks, lamp) --- diff --git a/fetch_instances.py b/fetch_instances.py index 30b05a5..d20bd31 100644 --- a/fetch_instances.py +++ b/fetch_instances.py @@ -6,6 +6,12 @@ import json domain = sys.argv[1] +blacklist = [ + "activitypub-troll.cf", + "gab.best", + "4chan.icu" +] + headers = { "user-agent": "Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Firefox/102.0" } @@ -59,6 +65,15 @@ c.execute( for instance in peerlist: instance = instance.lower() + + blacklisted = False + for domain in blacklist: + if domain in instance: + blacklisted = True + + if blacklisted: + continue + print(instance) try: c.execute(