fixes...
This commit is contained in:
@@ -39,7 +39,6 @@ async def get_network(author_id:int, limit:int = 50, offset:int = 0) -> list:
|
||||
}
|
||||
|
||||
followings = []
|
||||
followers = []
|
||||
try:
|
||||
async with AsyncClient() as client:
|
||||
response = await client.post(API_BASE, headers=headers, data=json.dumps(gql))
|
||||
@@ -49,12 +48,11 @@ async def get_network(author_id:int, limit:int = 50, offset:int = 0) -> list:
|
||||
followings = r.get("data", {}).get("authorFollowings", [])
|
||||
more_amount = limit - len(followings)
|
||||
if more_amount > 0:
|
||||
followers = get_followers(author_id, more_amount)
|
||||
followers = await get_followers(author_id, more_amount)
|
||||
followings.extend(followers)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
followings.extend(followers)
|
||||
|
||||
return followings
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user