当前位置:   article > 正文

python字节流字符串转换_response.body 是byte怎么转换成string

response.body 是byte怎么转换成string

python字节流bytes转换字符串str在这里插入图片描述

import requests
# # 发起请求获得响应 <Response [200]>
res = requests.get('https://www.yuque.com/books/share/6c1173d1-0b5c-461e-a389-06392f698852/aqvx0r')
# print(res)
# 直接读取
res.encoding =
  • 1
  • 2
  • 3
  • 4
  • 5
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/黑客灵魂/article/detail/927244
推荐阅读
相关标签
  

闽ICP备14008679号