mirror of
https://github.com/Watchful1/PushshiftDumps.git
synced 2025-07-03 10:56:40 -04:00
Longer sleeps
This commit is contained in:
parent
ed12d9c4ca
commit
db2c739b6d
1 changed files with 2 additions and 2 deletions
|
@ -89,7 +89,7 @@ def query_pushshift(ids, bearer, object_type, pushshift_token_function):
|
|||
'User-Agent': "In script by /u/Watchful1",
|
||||
'Authorization': f"Bearer {bearer}"}, timeout=15)
|
||||
except (requests.exceptions.ConnectionError, requests.exceptions.ReadTimeout):
|
||||
time.sleep(2)
|
||||
time.sleep(4 * i)
|
||||
continue
|
||||
if response is None:
|
||||
continue
|
||||
|
@ -100,7 +100,7 @@ def query_pushshift(ids, bearer, object_type, pushshift_token_function):
|
|||
log.warning(url)
|
||||
log.warning(f"'Authorization': Bearer {bearer}")
|
||||
bearer = pushshift_token_function(bearer)
|
||||
time.sleep(2)
|
||||
time.sleep(4 * i)
|
||||
if response is None:
|
||||
log.warning(f"4 requests failed with no response")
|
||||
log.warning(url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue