Firefox和selenium的版本号有一一对应的关系,不是版本低就一定能对上号!
firefox版本:46,下载地址
selenium版本:2.53.0 安装命令:
pip install selenium==2.53.0
验证码OCR工具:
- PIL 安装命令:
pip install Pillow
- Tesseract 安装教程
- Pytesser:下载地址(需要翻墙)
将解压后的整个文件夹放在C:\Python27\Lib\site-packages目录下,将pytesser改成__init__.py,该文件里的import Image
改成from PIL import Image
,tesseract_exe_name=‘tesseract’所在的目录(不是pytesser自己的目录!)
在调用Pytesser时,要先用os.chdir("C:\\Python27\\Lib\\site-packages\pytesser")
将当前目录改到pytesser所在的目录,再调用pytesser.image_file_to_string(file)
函数
网友评论