首页
消防安全隐患排查和验收
域名转发系统
祺平订单系统
您所在的位置:首页 > python > 正文

python解析请求结果json字符串

70
resp = requests.post(url, headers=headers)

假如resp返回结果为json字符串:
{
  "msg": "成功",
  "data": {
    "userLevel": "7"
  },
  "status": "1"
}

python操作json获取userLevel 值:
userLevel = json.loads(resp.text).get("data").get("userLevel")


本文网址:http://www.14study.cn/show.asp?id=195

若本文章侵犯了您的著作权,请联系我删除 QQ:695898855

上一篇: python 伪造IP
更多>>网友评论
发表评论