import requests import time import json import datetime
url = 'https://10.200.4.180/api/web/incident/search'
cookie = 'blablabla'
headers = {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': 'zh-CN,zh;q=0.9', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36', 'Connection': 'keep-alive', 'Accept-Encoding': 'gzip, deflate, br', 'Cookie': cookie.encode("utf-8").decode("latin1"), 'Origin': 'https://10.200.4.180', 'Referer': 'https://10.200.4.180/hosts', 'Content-Type': 'application/json; charset=UTF-8', 'Cache-Control': 'no-cache', 'sec-ch-ua-mobile': '?0', 'sec-fetch-dest': 'empty', 'sec-fetch-mode': 'cors', 'sec-fetch-site': 'same-origin' }
data = 'datacontent'
response = requests.post(url, data=data, headers=headers, verify=False)
res = json.loads(response.text)
|
文章评论