This commit is contained in:
8
scripts/captcha_solver.py
Normal file
8
scripts/captcha_solver.py
Normal file
@@ -0,0 +1,8 @@
|
||||
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
|
||||
Reference in New Issue
Block a user