Python爬虫Selenium安装
2017-10-05 20:05
363 查看
安装Selenium
pip install selenium
Chromedriver
https://sites.google.com/a/chromium.org/chromedriver/downloads进入页面,找到最后发布版本
转到:
https://chromedriver.storage.googleapis.com/index.html?path=2.33/
找到适合自己的系统版本
下载解压到 python 环境的Scripts文件夹里面
在命令行中输入 chromedriver 打印出提示信息表示安装完成
Starting ChromeDriver 2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f) on port 9515 Only local connections are allowed.
如果出现以下情况:
要么更新chrome,要么重新降低chromedriver的版本
>>> from selenium import webdriver >>> driver = webdriver.Chrome() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "D:\Anaconda3\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__ desired_capabilities=desired_capabilities) File "D:\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 151, in __init__ self.start_session(desired_capabilities, browser_profile) File "D:\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 240, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "D:\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 308, in execute self.error_handler.check_response(response) File "D:\Anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: session not created exception: Chrome version must be >= 60.0.3112.0 # 版本必须大于60.x (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 10.0.14393 x86_64)
相关文章推荐
- python3 [爬虫入门实战]爬虫之selenium 安装设置与初步使用
- [Python爬虫] 在Windows下安装PIP+Phantomjs+Selenium
- [Python爬虫] 在Windows下安装PIP+Phantomjs+Selenium
- [Python爬虫] 在Windows下安装PIP+Phantomjs+Selenium
- [Python爬虫] 在Windows下安装PIP+Phantomjs+Selenium
- Python爬虫利器之selenium的安装
- Python爬虫进阶二之PySpider框架安装配置
- win7(win32)安装python 爬虫工具scrapy记录
- Python爬虫学习之Selenium详解
- 关于Python爬虫程序scrapy的安装问题
- python爬虫环境安装-IDE-pycharm
- [python爬虫] Selenium定向爬取PubMed生物医学摘要信息
- 使用python+selenium制作浏览器爬虫,彻底解决ajax异步加载问题(待更新)
- win7 selenium python 验证码识别 pytesser使用 安装Pillow、pytesser、tesseract-ocr
- [Python爬虫] 之十五:Selenium +phantomjs根据微信公众号抓取微信文章
- [Python爬虫] Selenium实现自动登录163邮箱和Locating Elements介绍
- selenium的Python使用(一)浏览器驱动的安装及使用
- python+selenium(环境的安装)
- ubuntu python3 安装selenium及Firefox环境配置-亲自实验,没问题
- 【Python】学习selenium自动化测试:安装selenium+启动浏览器(windows平台、Linux Centos平台)