import requestsfrom requests.adapters import HTTPAdapters = requests.session()s.mount('https:',HTTPAdapter(max_retries=3))s.mount('https://',HTTPAdapter(max_retries=3))resp=s.get('http://www.baidu.com', timeout=0.1)print(resp.content)