def some_func(url):
try:
requests.get(url)
except exception as e:
# retry code here
I want to retry the request if the previous request gets a connection aborted error. How can I implement this?
def some_func(url):
try:
requests.get(url)
except exception as e:
# retry code here
I want to retry the request if the previous request gets a connection aborted error. How can I implement this?
From the requests docs:
For finer retry behaviour see urrlib3's doc on
Retry.