Skip to content

Instantly share code, notes, and snippets.

@scraperdragon
Created November 2, 2012 12:36
Show Gist options
  • Save scraperdragon/4001096 to your computer and use it in GitHub Desktop.
Save scraperdragon/4001096 to your computer and use it in GitHub Desktop.
Autoretry on requests
import requests
requests.defaults.defaults['max_retries'] = 5
# ... rest of code ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment