如何在python中解析Unirest调用的JSON结果?

2024-09-27 22:19:22 发布

您现在位置:Python中文网/ 问答频道 /正文

      response_post =unirest.get("http://timesofindia.indiatimes.com/feeds/newsdefaultfeeds.cms?feedtype=sjson",headers={
"X-Mashape-Key": "key",
"Accept": "application/json"},)

如何将response_post解析为json结果?在


Tags: comjsonhttpgetcmsresponsepostheaders
1条回答
网友
1楼 · 发布于 2024-09-27 22:19:22

你试过在请求的末尾添加.body吗?在

文件看起来很清楚-http://unirest.io/python.html

response_post =unirest.get("http://timesofindia.indiatimes.com/feeds/newsdefaultfeeds.cms?feedtype=sjson",headers={
    "X-Mashape-Key": "key",
    "Accept": "application/json"},).body

相关问题 更多 >

    热门问题