From 181cbececa7f501b021e13f365a329af38674fc2 Mon Sep 17 00:00:00 2001 From: AuroraWright Date: Fri, 26 Jan 2024 14:43:12 +0100 Subject: [PATCH] Adjust timeout again --- owocr/ocr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owocr/ocr.py b/owocr/ocr.py index 15bbbd3..e0fdcb3 100644 --- a/owocr/ocr.py +++ b/owocr/ocr.py @@ -166,7 +166,7 @@ class GoogleLens: url = f'https://lens.google.com/v3/upload?stcs={timestamp}' files = {'encoded_image': ('owo' + str(timestamp) + '.png', self._preprocess(img), 'image/png')} try: - res = requests.post(url, files=files, timeout=30) + res = requests.post(url, files=files, timeout=20) except requests.exceptions.Timeout: return 'Request timeout!'