kearney

自学还没成才的python猿

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

 

 

url=r'http://www.test.com/test.html'
html=requests.get(url,headers=header)
codetype=html.encoding#获取网页编码类型
html.encoding='GBK'#更改网页编码类型
print(html.text)

 

posted on 2017-09-28 10:30  Gino森  阅读(475)  评论(0编辑  收藏  举报