import pytesseract as pt

from PIL import Image

# 生成图片实例
image = Image.open(r'C:\Users\Thinkpad\PycharmProjects\learnpython\12-Spider\timg4.jpg')

# 调用pytesseract,把图片转换成文字
# 返回结果就是转换后的结果
text = pt.image_to_string(image)
print(text)
6eb09d48484256e9096348427af8de5710a32332
<mask token>

<mask token>
print(text)

<mask token>
image = Image.open(
    'C:\\Users\\Thinkpad\\PycharmProjects\\learnpython\\12-Spider\\timg4.jpg')
text = pt.image_to_string(image)
print(text)

import pytesseract as pt
from PIL import Image
image = Image.open(
    'C:\\Users\\Thinkpad\\PycharmProjects\\learnpython\\12-Spider\\timg4.jpg')
text = pt.image_to_string(image)
print(text)

import pytesseract as pt

from PIL import Image

# 生成图片实例
image = Image.open(r'C:\Users\Thinkpad\PycharmProjects\learnpython\12-Spider\timg4.jpg')

# 调用pytesseract,把图片转换成文字
# 返回结果就是转换后的结果
text = pt.image_to_string(image)
print(text)