get and return student_name & student_id
This commit is contained in:
parent
269e900434
commit
135099e595
@ -32,7 +32,10 @@ def connection(username,password):
|
||||
asp_net_sessionid_param = {'param':asp_net_sessionid_param}
|
||||
headers = {'Content-Type': 'application/json'}
|
||||
r = s.post(url='http://'+ip[0]+'-'+ip[1]+'-'+ip[2]+'-'+ip[3]+'-8080-p.webvpn.cust.edu.cn:8118/api/LoginApi/LGSSOLocalLogin?sf_request_type=ajax',data=json.dumps(asp_net_sessionid_param),headers=headers)
|
||||
return {'errcode': 200, 'errmsg': 'ok', 'ip': ip, 's': s}
|
||||
data = json.loads(r.content.decode('utf-8'))
|
||||
student_name = data['data']['StudentDto']['XM']
|
||||
student_id = data['data']['StudentDto']['XH']
|
||||
return {'errcode': 200, 'errmsg': 'ok', 'ip': ip, 's': s,'student_name':student_name,'student_id':sutdent_id}
|
||||
|
||||
def getGrade(Ip, S):
|
||||
headers = {'Content-Type': 'application/json'}
|
||||
|
Loading…
x
Reference in New Issue
Block a user