mirror of
https://github.com/anatolykopyl/dochunt.git
synced 2026-03-26 12:54:41 +00:00
🚀 Somewhat working version
This commit is contained in:
9
utils/detect.py
Normal file
9
utils/detect.py
Normal file
@@ -0,0 +1,9 @@
|
||||
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).lower()
|
||||
Reference in New Issue
Block a user