diff options
| author | Hygna <hygna@proton.me> | 2022-09-18 17:13:07 +0100 |
|---|---|---|
| committer | Hygna <hygna@proton.me> | 2022-09-18 17:13:07 +0100 |
| commit | a72a32612032280fb994c7f4495ca153123ac5c7 (patch) | |
| tree | 11820b350683a0b53dcc10587f44453e751f9e5a /src/instances/get_instances.py | |
| parent | removed ref_src and ref_url from twitter urls https://github.com/libredirect/... (diff) | |
| download | libredirect-a72a32612032280fb994c7f4495ca153123ac5c7.zip | |
Rollback master to pre-OOP
Diffstat (limited to 'src/instances/get_instances.py')
| -rw-r--r-- | src/instances/get_instances.py | 13 |
1 files changed, 3 insertions, 10 deletions
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') |
