标签:pre 请求 class 17. stat head col proxy status
import requests # 1.请求url url = ‘http://www.baidu.com‘ headers = { ‘User-Agent‘: ‘Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36‘ } free_proxy = {‘http‘: ‘27.17.45.90:43411‘} response = requests.get(url=url, headers=headers, proxies=free_proxy) print(response.status_code)
标签:pre 请求 class 17. stat head col proxy status
原文地址:https://www.cnblogs.com/hankleo/p/10603397.html