Compare commits
2 Commits
abc05ba85e
...
3ed03eaa83
Author | SHA1 | Date |
---|---|---|
Kay Faraday | 3ed03eaa83 | |
Kay Faraday | 30f8f1263f |
|
@ -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
|
||||||
|
|
||||||
|
|
1
utils.py
1
utils.py
|
@ -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__()
|
||||||
|
|
Loading…
Reference in New Issue