starkly

requests.get(url,headers).content.encode(\'iso-8859-1\').decode(\'gbk\')
需要注意的是,网站的编码方式可通过head标签里的meta标签查看,对应的编码方式放在decode()中。
content对应图像数据,text对应文本数据

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2021-09-28
  • 2021-11-28
  • 2021-11-23
  • 2021-11-06
猜你喜欢
  • 2020-02-21
  • 2018-09-23
  • 2022-12-23
  • 2022-03-10
  • 2021-11-24
相关资源
相似解决方案