this repo has no description
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix 500 catching

+20 -11
+20 -11
scripts/get_follows.py
··· 51 51 else: 52 52 logger.info(f"Error status code: {e.response.status_code}") 53 53 raise e 54 + except at_exceptions.RequestException as e: 55 + if e.response.status_code == 500: 56 + return get_all_follows(client, rate_limit, account_did) 57 + raise e 54 58 55 59 for follow in data.records: 56 60 follows.append(follow) ··· 58 62 # Limit to 1000 follows per account 59 63 while data.cursor and len(follows) < 1000: 60 64 await rate_limit.acquire() 61 - data = await client.com.atproto.repo.list_records( 62 - { 63 - "collection": "app.bsky.graph.follow", 64 - "repo": account_did, 65 - "cursor": data.cursor, 66 - "limit": 100, 67 - } 68 - ) 69 - 70 - for follow in data.records: 71 - follows.append(follow) 65 + try: 66 + data = await client.com.atproto.repo.list_records( 67 + { 68 + "collection": "app.bsky.graph.follow", 69 + "repo": account_did, 70 + "cursor": data.cursor, 71 + "limit": 100, 72 + } 73 + ) 74 + for follow in data.records: 75 + follows.append(follow) 76 + except at_exceptions.RequestException as e: 77 + if e.response.status_code == 500: 78 + continue 79 + else: 80 + raise e 72 81 73 82 return follows, account_did 74 83