Skip to content

Commit

Permalink
Swapped out for requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelloeater committed Oct 31, 2023
1 parent 1929373 commit d416688
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions fedi_gatus/config_gen/gen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging

import requests
import yaml

from fedi_gatus.shared import db
Expand Down Expand Up @@ -63,11 +64,12 @@ def generate_top_instances():
logging.info("Get top instances")
from pythonseer import Fediseer
f = Fediseer()
fediseer_data = f.whitelist.get(guarantors=3, endorsements=4)['instances']
# fediseer_data = f.whitelist.get(guarantors=3, endorsements=4)['instances']
# TODO Ask dbo about adding params to library
# https://github.com/Fediseer/pythonseer/issues/7

d = []
for i in fediseer_data:
d.append(i['domain'])
d = requests.get(url='https://fediseer.com/api/v1/whitelist',
params={'endorsements': 3, 'guarantors': 4, 'software_csv': 'lemmy', 'limit': 100, 'domains': True}).json()['domains']

# d = db.DbAccess().get_top_instances() # FIXME Backend is only returning a very small set of data... funnnnnn
instances = []
Expand Down

0 comments on commit d416688

Please sign in to comment.