Added handling for 429 rate limiting responses to dump()

Fixes my issue I created on master branch of creator.
This commit is contained in:
therealcybermattlee
2022-12-09 17:29:55 -06:00
committed by GitHub
parent a082e6ccbd
commit 054adcbd16
+12 -2
View File
@@ -247,7 +247,12 @@ def dump():
)
sc = rqst.status_code
if sc != 200:
if sc == 429:
retry_sleep = float(rqst.headers['Retry-After'])
print(f' {Y}[ retry in {retry_sleep}s]{W}')
sleep(retry_sleep)
dump()
elif sc != 200:
print(f' {R}[ No Dumps Found ]{W}')
else:
print(f' {G}[ Dumps Found ]{W}\n')
@@ -328,6 +333,11 @@ def breach_info():
)
else:
print(f' {R}[ Not Breached ]{W}')
elif sc == 429:
retry_sleep = float(rqst.headers['Retry-After'])
print(f' {Y}[ retry in {retry_sleep}s]{W}')
sleep(retry_sleep)
breach_info()
elif sc == 404:
print(f' {R}[ Not Breached ]{W}')
else:
@@ -406,4 +416,4 @@ try:
pass
except KeyboardInterrupt:
print(f'\n{R}[!] {C}Keyboard Interrupt.{W}')
exit()
exit()