惠小助线报机器人为您实时提供全网最新羊毛活动线报网
当前位置 > 活动线报 >python请教

python请教

只要是让你充钱的100%都是骗子,切记不要充1分钱!

易语言中是

返回数据 = 编码_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, 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/1203058956629…

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

可以正常运行

求教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)

相关主题: 线报屋

微信公众号:赚客撸羊毛

最大线报网站