Use a requests.Session object for retries instead of safe_while