Compare commits

..

2 Commits

Author SHA1 Message Date
Kay Faraday 3ed03eaa83 update README 2022-07-03 00:19:56 +00:00
Kay Faraday 30f8f1263f remove a debug print 2022-07-03 00:19:14 +00:00
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,8 @@
# mirror-bot # mirror-bot
Simple fedi bot which mirrors posts from another fedi account. Simple fedi bot which mirrors posts from another fedi account.
It's designed for cases when you want to defederate an entire instance except one account. It's designed for cases when you want to defederate an entire instance except one account,
or for evading blocks from accounts you want to follow.
## Installation ## Installation

View File

@ -43,7 +43,6 @@ class _RateLimitContextManager(contextlib.AbstractAsyncContextManager):
if resp.headers.get('X-RateLimit-Remaining') not in {'0', '1'}: if resp.headers.get('X-RateLimit-Remaining') not in {'0', '1'}:
return resp return resp
print('Hit rate limit for', self.args)
await sleep_until(datetime.fromisoformat(resp.headers['X-RateLimit-Reset'])) await sleep_until(datetime.fromisoformat(resp.headers['X-RateLimit-Reset']))
await self._request_cm.__aexit__(*(None,)*3) await self._request_cm.__aexit__(*(None,)*3)
return await self.__aenter__() return await self.__aenter__()