set timeout of OCR

This commit is contained in:
Weey
2019-09-19 21:59:07 +08:00
parent f377c7a849
commit 91c0a44a32

View File

@@ -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')