This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from requests.packages.urllib3.util.retry import Retry | |
# Sets the retry adaptor with the ability to properly backoff if we get 429s | |
retries = Retry( | |
total=3, | |
status_forcelist={429, 501, 502, 503, 504}, | |
backoff_factor=1, | |
respect_retry_after_header=True | |
) |
OlderNewer