提交 5a1ac305 编写于 作者: H hjdhnx

去除ddddocr依赖,增加在线验证码(易语言)接口配置

上级 38092847
......@@ -3,6 +3,9 @@ flask db migrate
flask db upgrade
supervisord -c manager.conf
pip install -i https://mirrors.cloud.tencent.com/pypi/simple --upgrade pip
pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple
可能会用到:
ddddocr==1.1.0 ; sys_platform == 'win32'
ddddocr==1.0.8 ; sys_platform != 'win32'
......
......@@ -25,5 +25,6 @@ WALL_PAPER_ENABLE = True # 启用自定义壁纸
WALL_PAPER = "https://picsum.photos/1280/720/?blur=10" # 自定义壁纸,可注释
SUP_PORT = 9001 # supervisord 服务端口
RETRY_CNT = 3 # 验证码重试次数
OCR_API = 'http://192.168.3.224:9000/api/ocr_img' # 验证码识别接口,传参数data
# OCR_API = 'http://192.168.3.224:9000/api/ocr_img' # 验证码识别接口,传参数data
OCR_API = 'http://dm.mudery.com:10000' # 验证码识别接口,传参数data
# {% if config.WALL_PAPER %}"wallpaper":"{{ config.WALL_PAPER }}",{% endif %}
\ No newline at end of file
......@@ -49,7 +49,8 @@ class OcrApi:
def verifyCode(url,headers,timeout=5,total_cnt=3,api=None):
if not api:
api = 'http://192.168.3.224:9000/api/ocr_img'
# api = 'http://192.168.3.224:9000/api/ocr_img'
api = 'http://dm.mudery.com:10000'
lower_keys = list(map(lambda x: x.lower(), headers.keys()))
host = getHome(url)
if not 'referer' in lower_keys:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册