from PIL import Image
import pytesseract
import os

paths = [
    '/root/.hermes/cache/images/img_c744ca3ed8d8.jpg',
    '/root/.hermes/cache/images/img_dbd9f5a86a05.jpg',
    '/root/.hermes/cache/images/img_bab3fa1e29a5.jpg',
    '/root/.hermes/cache/images/img_7c8756c62729.jpg',
    '/root/.hermes/cache/images/img_a4d89c4c666a.jpg',
]

for i, p in enumerate(paths, 1):
    if os.path.exists(p):
        img = Image.open(p)
        text = pytesseract.image_to_string(img, lang='chi_sim+eng')
        print(f"\n{'='*60}")
        print(f"图片 {i}: {os.path.basename(p)}  尺寸: {img.size}")
        print(f"{'='*60}")
        print(text.strip())
    else:
        print(f"图片 {i} 不存在: {p}")
