diff --git a/commands.txt b/commands.txt index 5203a412ec92d316fcc8f2760ac4149be2fa4f94..5f7e74d913513239ad338e886f879c9009c18a83 100644 --- a/commands.txt +++ b/commands.txt @@ -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' diff --git a/config.py b/config.py index 25388e6a1e6e978e62e1ff343ede18444a03ac25..2a8af5f77aece8d30dbf7003dae34c9348bac9f3 100644 --- a/config.py +++ b/config.py @@ -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 diff --git a/utils/encode.py b/utils/encode.py index 38f2fe6f55beca5cb78ba8cee0c2873ca80ca9ee..06dd7ed7f1210c2670dda656bb19b495129abd06 100644 --- a/utils/encode.py +++ b/utils/encode.py @@ -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: