mirror of
https://github.com/anatolykopyl/dochunt.git
synced 2026-03-26 21:04:43 +00:00
🐛 Made search term "all" work
This commit is contained in:
5
main.py
5
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:
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user