mirror of
https://git.kiwifarms.net/mint/ebooks.git
synced 2024-10-22 21:29:05 +00:00
Configurable fetch delay
This commit is contained in:
parent
9a85a336ce
commit
6fa9ec72d8
2 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"site": "https://botsin.space",
|
||||
"cw": null,
|
||||
"fetch_delay": 1,
|
||||
"learn_from_cw": false,
|
||||
"ignored_cws": [],
|
||||
"mention_handling": 1,
|
||||
|
@ -14,4 +15,4 @@
|
|||
"generation_mode": "markov",
|
||||
"access_token": "",
|
||||
"db_path": "posts.db"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ class PostFetcher:
|
|||
|
||||
next_page_url = outbox['first']
|
||||
while True:
|
||||
sleep(1)
|
||||
sleep(self.config['fetch_delay'])
|
||||
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