From fb6b55ae6d21fd3df679ccaa93f691c4888f073d Mon Sep 17 00:00:00 2001 From: AuroraWright Date: Wed, 24 Jan 2024 17:23:33 +0100 Subject: [PATCH] Increase Lens timeout --- owocr/ocr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owocr/ocr.py b/owocr/ocr.py index b8f6e53..e81d2ee 100644 --- a/owocr/ocr.py +++ b/owocr/ocr.py @@ -171,7 +171,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=(3, 10)) + res = requests.post(url, files=files, timeout=30) except requests.exceptions.Timeout: return 'Request timeout!'