url=r‘http://www.test.com/test.html‘ html=requests.get(url,headers=header) codetype=html.encoding#获取网页编码类型 html.encoding=‘GBK‘#更改网页编码类型 print(html.text)
时间: 2024-10-04 02:59:05
url=r‘http://www.test.com/test.html‘ html=requests.get(url,headers=header) codetype=html.encoding#获取网页编码类型 html.encoding=‘GBK‘#更改网页编码类型 print(html.text)