马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
import requests
session = requests.session()
log_url = 'http://antiepivn.goertek.com:8099/got/temperature/login.html' # 登陆请求网址
d1_url = "http://antiepivn.goertek.com:8099/got/temperature/to_temperature.html" # 体温申报页面获取网址
shenbao_url = "http://antiepivn.goertek.com:8099/got/temperature/add.html" # 体温申报请求网址
back_url = ""
d2_url = ""
xingcheng_url = "http://antiepivn.goertek.com:8099/got/personTrack/add.html" # 行程申报请求网址
user_Agent = [("User-Agent",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36")]
data = {"employeeNumber": "******", "numId": "******"} # 登陆用的账户密码
data_3 = {
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'zh-CN,zh;q=0.9',
'Connection': 'keep-alive',
'Cookie': 'JSESSIONID=5EEEFEB412906F86E2E0292437E3B504',
'Host': 'antiepivn.goertek.com:8099',
'Referer': 'http://antiepivn.goertek.com:8099/got/temperature/login.html',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36', }
data1 = {'employeeNumber': '2001782',
'name': '毛乐乐',
'redFlag': '',
'HBFlag': '',
'JGFlag': '',
'deptManager': '',
'addSpecialArea': '',
'surveyDate': '2021-05-25',
'morning': '36.3',
'normal': '1',
'remark': ''} # 体温申报发送数据
r = requests.post(log_url, data,user_Agent) #登陆账号
print(r.text)
d3 = session.get(d1_url) #获取体温申报页面
print(d3.text)
r1 = session.post(shenbao_url, data1,user_Agent) #体温申报请求
print(r1.text)
print("体温提交成功")
|