1 import requests
2
3 headers = {
4 "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
5 }
6
7 proxies = {
8 "http": "http://61.190.102.50:15845"
9 }
10
11 response = requests.get("https://www.baidu.com", headers=headers, proxies=proxies, timeout=3, verify=False)
12 print(response)
13 print(response.url)