Python使用selenium实现网页用户名 密码 验证码自动登录功能

一、安装selenium

二、下载谷歌浏览器驱动

1、去http://chromedriver.storage.googleapis.com/index.html下载chromedriver.exe(根据chrome的版本下载对应的)

2、将下载好的chromedriver.exe解压后放到指定目录

三、安装图片文字OCR识别-tesseract-ocr4.00.00

1、软件下载网址https://github.com/tesseract-ocr/tesseract/wiki/4.0-with-LSTM#400-alpha-for-windows

选择4.0.0-alpha for Windows下面Windows Installer made with MinGW-w64 from UB Mannheim,点击UB Mannheim进入另一网页。

 

2、进到网址:https://github.com/UB-Mannheim/tesseract/wiki

点击tesseract-ocr-setup-4.0.0-alpha.20170804.exe,下载4.0版本的软件

根据系统版本不同下载32位或64位的版本

 

3、找到下载的文件,单击安装

 

4、记住安装路径:

 

5、复制安装地址D:\Program Files (x86)\Tesseract-OCR   添加到系统环境变量中。

进入控制台输入tesseract -v进行测试安装成功与否

 

四、安装pytesseract

以上都做好后,开始安装pytesseract ,进入DOS环境输入:pip install pytesseract进行安装

 

安装成功:

 

五、编写python代码

未完待续。。。。。。

猜你喜欢

转载自www.cnblogs.com/yanlin-10/p/9381199.html