美文网首页
selenium爬取问题

selenium爬取问题

作者: __8771 | 来源:发表于2019-03-15 18:30 被阅读0次
  • 问题描述
    使用selenium登录淘宝京东遇到点击登录按钮没反应,并且手动点击也无反应

  • 决解办法
    1.启动浏览器,dos命令下输入以下代码,弹出浏览器

chrome.exe --remote-debugging-port=9222 --user-data-dir="C:\selenum\AutomationProfile"

2.selenium接管浏览器,绕过selenium监测,正常使用

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.add_experimental_option("debuggerAddress", "127.0.0.1:9222")
chrome_driver = "C://Python27/chromedriver.exe"   #chrome插件
browser = webdriver.Chrome(chrome_driver, chrome_options=chrome_options)  

相关文章

网友评论

      本文标题:selenium爬取问题

      本文链接:https://www.haomeiwen.com/subject/iyprmqtx.html