mirror of
https://git.kiwifarms.net/mint/ebooks.git
synced 2024-10-22 23:29:06 +00:00
1 second delay for post fetching
This commit is contained in:
parent
5d61b6a5e6
commit
9a85a336ce
1 changed files with 2 additions and 0 deletions
|
@ -16,6 +16,7 @@ from functools import partial
|
|||
from typing import Iterable, NewType
|
||||
from utils import shield, HandleRateLimits, suppress
|
||||
from third_party.utils import extract_post_content
|
||||
from time import sleep
|
||||
|
||||
USER_AGENT = (
|
||||
'pleroma-ebooks; '
|
||||
|
@ -170,6 +171,7 @@ class PostFetcher:
|
|||
|
||||
next_page_url = outbox['first']
|
||||
while True:
|
||||
sleep(1)
|
||||
print(f'Fetching {next_page_url}... ')
|
||||
async with self._rl_handler.request('GET', next_page_url) as resp: page = await resp.json()
|
||||
|
||||
|
|
Loading…
Reference in a new issue