requests的text() 和 content() 的区别

text属性返回的是decode()解码的Unicode型的数据,如果headers没有charset字符集的text属性会调用charset来计算字符集;而content属性返回的是bytes型的原始数据,更节省计算资源。

猜你喜欢

转载自blog.csdn.net/Liquor6/article/details/106793679