• I put the whole code for convenience:

    from requests import Session
    from requests.adapters import HTTPAdapter
    from urllib3.util import Retry
    
    requests_retry = Retry(total=12, backoff_factor=2, status_forcelist=[
                           429, 500, 501, 502, 503, 504], method_whitelist=False)
    requests_session = Session()
    requests_session.mount('http://', HTTPAdapter(max_retries=requests_retry))
    requests_session.mount('https://', HTTPAdapter(max_retries=requests_retry))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment