From a72a32612032280fb994c7f4495ca153123ac5c7 Mon Sep 17 00:00:00 2001 From: Hygna Date: Sun, 18 Sep 2022 17:13:07 +0100 Subject: Rollback master to pre-OOP --- src/instances/beatbump.json | 7 ++----- src/instances/bibliogram.json | 6 ++++++ src/instances/get_instances.py | 13 +++---------- 3 files changed, 11 insertions(+), 15 deletions(-) create mode 100644 src/instances/bibliogram.json (limited to 'src') diff --git a/src/instances/beatbump.json b/src/instances/beatbump.json index df5a20f7..e09273dd 100644 --- a/src/instances/beatbump.json +++ b/src/instances/beatbump.json @@ -1,9 +1,6 @@ { - "normal": [ - "https://beatbump.ml", - "https://beatbump.esmailelbob.xyz" - ], - "tor": [], + "normal": ["https://beatbump.ml", "https://beatbump.esmailelbob.xyz"], + "tor": ["http://beatbump.esmail5pdn24shtvieloeedh7ehz3nrwcdivnfhfcedl7gf4kwddhkqd.onion"], "i2p": [], "loki": [] } diff --git a/src/instances/bibliogram.json b/src/instances/bibliogram.json new file mode 100644 index 00000000..d72f2129 --- /dev/null +++ b/src/instances/bibliogram.json @@ -0,0 +1,6 @@ +{ + "normal": ["https://bibliogram.1d4.us", "https://bibliogram.froth.zone", "https://ig.tokhmi.xyz", "https://ig.beparanoid.de", "https://bibliogram.priv.pw"], + "tor": [], + "i2p": [], + "loki": [] +} diff --git a/src/instances/get_instances.py b/src/instances/get_instances.py index 085d7273..250dd258 100644 --- a/src/instances/get_instances.py +++ b/src/instances/get_instances.py @@ -230,16 +230,9 @@ def nitter(): def bibliogram(): - r = requests.get('https://bibliogram.art/api/instances') - rJson = json.loads(r.text) - bibliogramList = {} - bibliogramList['normal'] = [] - bibliogramList['tor'] = [] - bibliogramList['i2p'] = [] - bibliogramList['loki'] = [] - for item in rJson['data']: - bibliogramList['normal'].append(item['address']) - mightyList['bibliogram'] = bibliogramList + json_object = json.dumps(mightyList, ensure_ascii=False, indent=2) + with open('./src/instances/bibliogram.json') as file: + mightyList['bibliogram'] = json.load(file) print(Fore.GREEN + 'Fetched ' + Style.RESET_ALL + 'Bibliogram') -- cgit 1.4.1