diff --git a/py12306/helpers/OCR.py b/py12306/helpers/OCR.py index 0345d0b..a20f6bd 100644 --- a/py12306/helpers/OCR.py +++ b/py12306/helpers/OCR.py @@ -58,7 +58,7 @@ class OCR: data = { 'img': img } - response = self.session.post(API_FREE_CODE_QCR_API, data=data) + response = self.session.post(API_FREE_CODE_QCR_API, data=data, timeout=30) result = response.json() if result.get('msg') == 'success': pos = result.get('result')