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()