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

时间:2016-04-04 13:51:10

标签: python json unirest

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

如何将response_post解析为json结果?

1 个答案:

答案 0 :(得分:0)

您是否尝试在请求结束时添加.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