1. 首页
  2. 时时线报

python请教

易语言中是返回数据 = 编码_utf8到gb2312 (到文本 (网页_访问_对象 (“http://” + 海康IP + “/artemis-web/debug”, 1, #提交信息, , , #协议头 )))#提交信息内容如下{"httpMethod":"POST","path":"/api/acs/v2/door/events","headers":{},"query":{},"parameter":{},"body":{"pageNo":1,"pageSize":200,"sort":"personName","doorName":"199","receiveStartTime": "2001-10-25T00:00:00+08:00","receiveEndTime": "2991-10-25T23:59:59+08:00","startTime": "2022-02-16T00:00:00+08:00","endTime": "2022-02-16T23:59:59+08:00","order":"asc"},"contentType":"application/json;charset=UTF-8","mock":false,"appKey":"284","appSecret":"S"}#协议头内容如下Accept: application/json, text/plain, */*Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9Cache-Control: no-cacheConnection: keep-aliveContent-Length: 657Content-Type: application/json;charset=UTF-8Cookie: __guid=121; monitor_count=11; browserLan=zh_CN; sessionId=5e9Host: 192.10.70.121:9017Origin: http://192.10.70.121:9017Pragma: no-cacheReferer: http://192.10.70.121:9017/artemis-web/debug/1203058956629…User-Agent: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36X-Requested-With: XMLHttpRequest可以正常运行求教python中如何编写def posti(): headers = { ‘Accept’: ‘application/json, text/plain, */*’, ‘Accept-Encoding’: ‘gzip, deflate’, ‘Accept-Language’: ‘zh-CN,zh;q=0.9’, ‘Cache-Control’: ‘no-cache’, ‘Connection’: ‘keep-alive’, ‘Content-Length’: ‘657’, ‘Content-Type’: ‘application/json;charset=UTF-8’, ‘Cookie’: ‘ __guid=121; monitor_count=11; browserLan=zh_CN; sessionId=5e9’, ‘Host’: ‘192.10.70.121:9017’, ‘Origin’: ‘http://192.10.70.121:9017’, ‘Pragma’: ‘no-cache’, ‘Referer’: ‘http://192.10.70.121:9017/artemis-web/debug/1203058956629442560’, ‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36’, ‘X-Requested-With’: ‘XMLHttpRequest’ } httpURL = "http://192.10.70.121:9017/artemis-web/debug" data = { "httpMethod": "POST", "path": "/api/acs/v2/door/events", "headers": {}, "query": {}, "parameter": {}, "body": {"pageNo": 1, "pageSize": 200, "sort": "personName", "doorName": "199", "receiveStartTime": "2001-10-25T00:00:00+08:00", "receiveEndTime": "2991-10-25T23:59:59+08:00", "startTime": "2022-02-16T00:00:00+08:00", "endTime": "2022-02-16T23:59:59+08:00", "order": "asc"}, "contentType": "application/json;charset=UTF-8", "mock": "false", "appKey": "284", "appSecret": "S" } response_post = requests.post(httpURL, data=data,headers=headers, timeout=30) print(response_post.text)

点此加入老铁吧线报推送QQ群:1004763262

点击这里加入本站QQ群、线报群、微信群一起交流参加各种活动项目和线报

京东神车bug群

联系我们

134-380-8849

在线咨询:点击这里给我发消息

邮件:cjlaotie@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

QR code