mirror of
https://github.com/anatolykopyl/dochunt.git
synced 2026-03-26 12:54:41 +00:00
10 lines
245 B
Python
10 lines
245 B
Python
import pytesseract
|
|
from PIL import Image
|
|
import io
|
|
import requests
|
|
|
|
def detect(url):
|
|
response = requests.get(url)
|
|
img = Image.open(io.BytesIO(response.content))
|
|
return pytesseract.image_to_string(img, lang='rus', timeout=30).lower()
|