mirror of
https://github.com/Watchful1/PushshiftDumps.git
synced 2025-07-03 10:56:40 -04:00
Add case for no response
This commit is contained in:
parent
51de1f2ac2
commit
9b45f8339e
1 changed files with 4 additions and 0 deletions
|
@ -101,6 +101,10 @@ def query_pushshift(ids, bearer, object_type, pushshift_token_function):
|
|||
log.warning(f"'Authorization': Bearer {bearer}")
|
||||
bearer = pushshift_token_function(bearer)
|
||||
time.sleep(2)
|
||||
if response is None:
|
||||
log.warning(f"4 requests failed with no response")
|
||||
discord_logging.flush_discord()
|
||||
sys.exit(1)
|
||||
if response.status_code != 200:
|
||||
log.warning(f"4 requests failed with status code {response.status_code}")
|
||||
discord_logging.flush_discord()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue