scrapy

发布时间:2016-12-6 8:10:50编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"scrapy ",主要涉及到scrapy 方面的内容,对于scrapy 感兴趣的同学可以参考一下。

使用python通过selenium模拟打开chrome窗口报错 出现 "您使用的是不受支持的命令行标记:--ignore-certificate-errors

http://www.cnblogs.com/jzss/p/5567253.html
#在程序前加上这段代码
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches",["ignore-certificate-errors"])
driver = webdriver.Chrome(chrome_options=options)
 
 

Leon's comment leads to the correct information that compound class names are no longer supported. What you could do instead is try using css selectors. In your case, the following line of code should help you get the element you want :

el3 = driver.find_element_by_css_selector(".action-btn.cancel.alert-display")

It finds the element with all three classes (action-btn, cancel and alert-display) in the class attribute. Do note that the order of the classes do not matter here and any of the classes may appear anywhere in the attribute. As long as the element has all three classes, it will be selected. If you want the order of the classes to be fixed, you can use the following xpath :

el3 = driver.find_element_by_xpath("//*[@class='action-btn cancel alert-display']") 
 
 
 
你好,可以在chrome浏览器地址栏输入“chrome://extensions/”,打开chrome浏览器设置,点击“将chrome浏览器设置为默认浏览器”。
 


上一篇:[LeetCode] 4Sum II 四数之和之二
下一篇:hive里的扩展接口(CLI、Beeline、JDBC)

相关文章

关键词: scrapy

相关评论

本站评论功能暂时取消,后续此功能例行通知。

一、不得利用本站危害国家安全、泄露国家秘密,不得侵犯国家社会集体的和公民的合法权益,不得利用本站制作、复制和传播不法有害信息!

二、互相尊重,对自己的言论和行为负责。

最近更新

好贷网好贷款