From 1d88d0e9363133b04bf59f8e3a6e75962bb8b4ad Mon Sep 17 00:00:00 2001 From: Anatoly Kopyl Date: Tue, 6 Apr 2021 15:34:23 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Made=20search=20term=20"all"=20w?= =?UTF-8?q?ork?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 5 +++-- utils/detect.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 1cadcf4..174cb19 100644 --- a/main.py +++ b/main.py @@ -14,6 +14,8 @@ config.read('config.ini') terms = ast.literal_eval(config['SEARCH']['terms']) if config['SEARCH']['interests'] != "all": interests = ast.literal_eval(config['SEARCH']['interests']) +else: + interests = "all" c = Console() c.print('[b]Dochunt[/b] starting...', style='yellow') @@ -29,8 +31,7 @@ for i in range(len(terms)): photos_processed = 0 photos_saved = 0 -c.rule() -c.print('Watching documents :eyes:') +c.print('Watching documents :eyes:', style='italic') c.print(f'> Documents scanned {photos_processed}') c.print(f'> Documents saved {photos_saved}') while True: diff --git a/utils/detect.py b/utils/detect.py index 5c95e55..81486e0 100644 --- a/utils/detect.py +++ b/utils/detect.py @@ -6,4 +6,4 @@ import requests def detect(url): response = requests.get(url) img = Image.open(io.BytesIO(response.content)) - return pytesseract.image_to_string(img).lower() + return pytesseract.image_to_string(img, lang='rus', timeout=30).lower()