python爬虫多次请求超时的几种重试方法(6种)
第一种方法 headers = Dict() url = 'https://www.baidu.com' try: proxies = None response = requests.get(url, headers=headers, verify=False, proxies=None, timeout=3) except: # logdebug('requests failed one time') try: proxies = None response = requests.get(url, headers=headers, verify=False, proxi
用户评论