mirror of https://github.com/testerSunshine/12306
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
774 B
27 lines
774 B
6 years ago
|
# coding=utf-8
|
||
|
class checkRandCodeAnsyn:
|
||
|
def __init__(self, session, randCode, token):
|
||
|
self.session = session
|
||
|
self.randCode = randCode
|
||
|
self.token = token
|
||
|
|
||
|
def data_par(self):
|
||
|
"""
|
||
|
:return:
|
||
|
"""
|
||
|
data = {
|
||
|
"randCode": self.randCode,
|
||
|
"rand": "randp",
|
||
|
"_json_att": "",
|
||
|
"REPEAT_SUBMIT_TOKEN": self.token
|
||
|
}
|
||
|
return data
|
||
|
|
||
|
def sendCheckRandCodeAnsyn(self):
|
||
|
"""
|
||
|
下单验证码识别
|
||
|
:return:
|
||
|
"""
|
||
|
checkRandCodeAnsynUrl = self.session.urls["checkRandCodeAnsyn"]
|
||
|
fresult = self.session.httpClint.send(checkRandCodeAnsynUrl, self.data_par()) # 校验验证码是否正确
|
||
|
return fresult['data']['msg']
|