繁体   English   中英

"编码请求响应 - Python"

[英]Encoding Requests response - Python

我无法弄清楚为什么我没有从我的回复中收到字母 æøå。 ø = \Ø api 上的文档说 utf-8,我检查了 r.encoding 是 utf-8

header = {'Client-Identifier': 'test'}
r = requests.get(url='https://gbfs.urbansharing.com/oslobysykkel.no/station_information.json'

你可以使用request.json,响应基本上是json。

header = {'Client-Identifier': 'test'}
r = requests.get(url='https://gbfs.urbansharing.com/oslobysykkel.no/station_information.json')
print(r.json())

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM