Some checks failed
Deploy static content to Pages / deploy (push) Has been cancelled
9 lines
217 B
Python
9 lines
217 B
Python
import pytesseract
|
|
from PIL import Image
|
|
|
|
def solve_captcha(image_path):
|
|
# 使用OCR识别验证码
|
|
image = Image.open(image_path)
|
|
captcha_text = pytesseract.image_to_string(image)
|
|
return captcha_text
|