标签:html span microsoft import text requests blog sof soft
import requests
headers = {"headers头部文件"}
url = ‘http://www.baidu.com/‘
html = requests.get(url,headers=headers)
html.encoding = ‘gbk‘ #转成该网站的格式
print(html.text)
详细用法请参见
↓↓↓↓↓↓↓↓↓↓↓↓↓↓
https://www.cnblogs.com/mzc1997/p/7813801.html
标签:html span microsoft import text requests blog sof soft
原文地址:https://www.cnblogs.com/qmjy/p/11360391.html