mirror of
https://github.com/anatolykopyl/dochunt.git
synced 2026-03-26 12:54:41 +00:00
🚸 Made output html instead of txt
This commit is contained in:
@@ -5,5 +5,9 @@ import requests
|
||||
|
||||
def detect(url):
|
||||
response = requests.get(url)
|
||||
img = Image.open(io.BytesIO(response.content))
|
||||
try:
|
||||
img = Image.open(io.BytesIO(response.content))
|
||||
except OSError:
|
||||
return ''
|
||||
|
||||
return pytesseract.image_to_string(img, lang='rus', timeout=30).lower()
|
||||
|
||||
Reference in New Issue
Block a user