From c87724d1708ada6245ae22b2bb8ebf8fccd9a4eb Mon Sep 17 00:00:00 2001 From: Jalin Date: Thu, 7 Mar 2019 09:58:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E5=85=8D=E8=B4=B9=E6=89=93?= =?UTF-8?q?=E7=A0=81=E6=8E=A5=E5=8F=A3=E5=9C=B0=E5=9D=80=20#140?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- py12306/helpers/OCR.py | 4 ++-- py12306/helpers/api.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/py12306/helpers/OCR.py b/py12306/helpers/OCR.py index b376fa8..af9be61 100644 --- a/py12306/helpers/OCR.py +++ b/py12306/helpers/OCR.py @@ -60,9 +60,9 @@ class OCR: } response = self.session.post(API_FREE_CODE_QCR_API, json=data) result = response.json() - if result.get('success') and result.get('check'): + if result.get('success') and result.get('data.check'): check_data = { - 'check': result.get('check'), + 'check': result.get('data.check'), 'img_buf': img, 'logon': 1, 'type': 'D' diff --git a/py12306/helpers/api.py b/py12306/helpers/api.py index 304b258..1a9dc04 100644 --- a/py12306/helpers/api.py +++ b/py12306/helpers/api.py @@ -44,7 +44,8 @@ API_QUERY_INIT_PAGE = BASE_URL_OF_12306 + '/otn/leftTicket/init' API_NOTIFICATION_BY_VOICE_CODE = 'http://ali-voice.showapi.com/sendVoice?' API_NOTIFICATION_BY_VOICE_CODE_DINGXIN = 'http://yuyin2.market.alicloudapi.com/dx/voice_notice' -API_FREE_CODE_QCR_API = 'http://60.205.200.159/api' +# API_FREE_CODE_QCR_API = 'http://60.205.200.159/api' # 19-03-07 接口已失效 +API_FREE_CODE_QCR_API = 'https://12306.jiedanba.cn/api/v2/getCheck' API_FREE_CODE_QCR_API_CHECK = 'http://check.huochepiao.360.cn/img_vcode' API_CHECK_CDN_AVAILABLE = 'https://{}/otn/dynamicJs/omseuuq'