python selenium chrome webdriver给我数据;页 [英] python selenium chrome webdriver giving me data; page

查看:34
本文介绍了python selenium chrome webdriver给我数据;页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用以下代码,试图向自己介绍硒.当它运行时,Chrome浏览器将打开,但页面为空白,据我所知没有任何源代码,数据".在地址栏中.任何有关为什么发生这种情况的信息将不胜感激.

I've been working with the following code, trying to introduce myself to selenium. When it runs, the chrome browser opens, but the page is blank, with no source code a far as I can tell, and 'data;' in the address bar. Any information on why this is happening would be greatly appreciated.

from selenium import webdriver

browser = webdriver.Chrome(service_args = ['--ignore-ssl-errors=true', '--ssl-protocol=TLSv1'])

url = 'https://www.google.com/'
browser.get(url) 

我也尝试了不使用service_args并尝试指定驱动程序路径和两者,但是每次都得到相同的结果

I have also tried it without the service_args and tried it specifying the driver path and both, but get the same result each time

推荐答案

最可能的原因是您的浏览器与Webdriver不兼容.请确认您的浏览器版本和Webdriver版本.

The most possibility is your browser not compatible with the webdriver. Please confirm your browser version and webdriver version.

我的chrome版本是60,而chromerdriver是chromedriver_2.30.exe

My chrome version is 60 and chromerdriver is chromedriver_2.30.exe

您可以在此处

这篇关于python selenium chrome webdriver给我数据;页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆