修改登录验证码权限问题
parent
19de91af55
commit
806be00d3d
|
@ -1,6 +1,6 @@
|
||||||
FROM python:2.7.15
|
FROM python:2.7.15
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
COPY Docker .
|
ADD . /usr/src/app
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
ENV TZ Asia/Shanghai
|
ENV TZ Asia/Shanghai
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
- 修改config/ticket_config.yaml文件,按照提示更改自己想要的信息
|
- 修改config/ticket_config.yaml文件,按照提示更改自己想要的信息
|
||||||
- 运行根目录run.py,即可开始
|
- 运行根目录run.py,即可开始
|
||||||
- 如果你的服务器安装了docker,那么就可以docker启动
|
- 如果你的服务器安装了docker,那么就可以docker启动
|
||||||
- 1、docker build -t dockerautosign .
|
- 1、docker build -t dockerticket .
|
||||||
- 2、docker run dockerautosign python start.py &
|
- 2、docker run dockerticket python run.py &
|
||||||
- 3、本来是可以直接Dockerfile启动的,不知道为毛启动不了,如果有大佬看到问题所在,欢迎提出
|
- 3、本来是可以直接Dockerfile启动的,不知道为毛启动不了,如果有大佬看到问题所在,欢迎提出
|
||||||
|
|
||||||
- 目录对应说明
|
- 目录对应说明
|
||||||
|
|
|
@ -115,9 +115,10 @@ class GoLogin:
|
||||||
raise UserPasswordException(u"温馨提示: 用户名或者密码为空,请仔细检查")
|
raise UserPasswordException(u"温馨提示: 用户名或者密码为空,请仔细检查")
|
||||||
login_num = 0
|
login_num = 0
|
||||||
while True:
|
while True:
|
||||||
if not getPassCodeNewOrderAndLogin(session=self.session, imgType="login"):
|
result = getPassCodeNewOrderAndLogin(session=self.session, imgType="login")
|
||||||
|
if not result:
|
||||||
continue
|
continue
|
||||||
self.randCode = getRandCode(self.is_auto_code, self.auto_code_type)
|
self.randCode = getRandCode(self.is_auto_code, self.auto_code_type, result)
|
||||||
login_num += 1
|
login_num += 1
|
||||||
self.auth()
|
self.auth()
|
||||||
if self.codeCheck():
|
if self.codeCheck():
|
||||||
|
|
|
@ -27,6 +27,6 @@ def getPassCodeNewOrderAndLogin(session, imgType):
|
||||||
else:
|
else:
|
||||||
print(u"下载验证码成功")
|
print(u"下载验证码成功")
|
||||||
open(img_path, 'wb').write(result)
|
open(img_path, 'wb').write(result)
|
||||||
return True
|
return result
|
||||||
except OSError:
|
except OSError:
|
||||||
print (u"验证码下载失败,可能ip被封,确认请手动请求: {0}".format(codeImgUrl))
|
print (u"验证码下载失败,可能ip被封,确认请手动请求: {0}".format(codeImgUrl))
|
||||||
|
|
|
@ -5,7 +5,7 @@ from config.ticketConf import _get_yaml
|
||||||
from damatuCode.ruokuai import RClient
|
from damatuCode.ruokuai import RClient
|
||||||
|
|
||||||
|
|
||||||
def getRandCode(is_auto_code, auto_code_type):
|
def getRandCode(is_auto_code, auto_code_type, result):
|
||||||
"""
|
"""
|
||||||
识别验证码
|
识别验证码
|
||||||
:return: 坐标
|
:return: 坐标
|
||||||
|
@ -17,8 +17,9 @@ def getRandCode(is_auto_code, auto_code_type):
|
||||||
return
|
return
|
||||||
if auto_code_type == 2:
|
if auto_code_type == 2:
|
||||||
rc = RClient(_get_yaml()["auto_code_account"]["user"], _get_yaml()["auto_code_account"]["pwd"])
|
rc = RClient(_get_yaml()["auto_code_account"]["user"], _get_yaml()["auto_code_account"]["pwd"])
|
||||||
im = open('./tkcode', 'rb').read()
|
print(result)
|
||||||
Result = rc.rk_create(im, 6113)
|
# im = open('./tkcode', 'rb').read()
|
||||||
|
Result = rc.rk_create(result, 6113)
|
||||||
if "Result" in Result:
|
if "Result" in Result:
|
||||||
return codexy(Ofset=",".join(list(Result["Result"])), is_raw_input=False)
|
return codexy(Ofset=",".join(list(Result["Result"])), is_raw_input=False)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue