Python 爬虫之 requests模块(ua伪装、代理、cookies、防盗链 Referer)、re模块、xpath模块、selenium
Python爬虫requests下载pipinstall-ihttps://pypi.tuna.tsinghua.edu.cn/simplerequests发送get请求案例:百度importrequestsurl="http://www.baidu.com"#发送get请求response=requests.get(url)#设置字符集(根据爬取网页charset=utf-8)response.