DeprecationWarning: use options instead of chrome_options
使用 python selenium,但当我运行时候出现:DeprecationWarning: use options instead of chrome_options driver = webdriver.Chrome(chrome_options=option)
这只是一个警告,并不会影响程序运行,如果实在要解决,可以替换为下面这种方式。
报这个警告的原因是在新版本中,这种写法已经被弃用了。
解决办法:
#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
@author: Roc-xb
"""
from selenium import webdriver
from selenium.webdriver.chrome.options import Optionsif __name__ == '__main__':chrome_options = Options()chrome_options.add_argument('--headless')driver = webdriver.Chrome(options=chrome_options)
DeprecationWarning: use options instead of chrome_options相关推荐
- DeprecationWarning: use options instead of chrome_options self.driver = webdriver.Chrome(chrome_op
DeprecationWarning: use options instead of chrome_options self.driver = webdriver.Chrome(chrome_opti ...
- 大型情感剧集Selenium:3_元素定位 #华为云·寻找黑马程序员#
关于昨天的文章 今天有朋友反馈,代码运行的时候,selenium提示警告 DeprecationWarning: use options instead of chrome_options drive ...
- 运行浏览器无痕模式报错
运行浏览器无痕模式报错:DeprecationWarning: use options instead of chrome_options 中文翻译为:用options替代chrome_options ...
- Python selenium自动化操作Chrome浏览器
活动地址:CSDN21天学习挑战赛 文章目录 一.Selenium搭建环境 1.安装 2.安装Chrome安装浏览器驱动WebDriver 1)查看Chrome浏览器版本 2)在驱动器版本里选 ...
- python 公园、绿地、饭店等任何一种poi类型信息数据的爬取
利用百度或高德的api接口,是无法获得这些poi点的详细信息数据的,只能获得poi的经纬度和类型,还有名字,但是这个poi的面积,形状具体是咋样的,我们是无法得知的,百度或高德的api接口没有给出这个 ...
- 记录第一次使用selenium 调用Chrome无头浏览器和options一些参数解析整合
记录第一次使用selenium 调用Chrome无头浏览器和options一些参数解析整合 1.selenium使用 from selenium import webdriver from selen ...
- (上)python3 selenium3 从框架实现代码学习selenium让你事半功倍
本文感谢以下文档或说明提供的参考. Selenium-Python中文文档 Selenium Documentation Webdriver 参考 如有错误欢迎在评论区指出,作者将即时更改. 环境说明 ...
- Selenium 爬虫应用的学习
文章目录 一.介绍 二.安装 三.测试 1.Chrome 2.Firefox 四.实战 1.定义字段 2. 打开浏览器,加载网页 3.定位标签,获取数据 4.保存数据到数据库 一.介绍 Seleniu ...
- selenium工作原理详解
selenium简介 Selenium是一个用于Web应用程序自动化测试工具.Selenium测试直接运行在浏览器中,就像真正的用户在操作一样.支持的浏览器包括IE(7, 8, 9, 10, 11), ...
最新文章
- 报表工具JasperReports视频教程
- 人工智能机器视觉的未来发展趋势
- Java学习笔记(7)——Java基础之IO多线程网络思维导图
- Python 链接汇总
- 如何一行代码搞定SSD模型推理与结果解析
- 商家 APP 如何接入新版支付宝支付,老版本商家如何升级
- linux ext4,ext3的特点和区别
- Python面向对象中的多态与静态语言(C++,Java)的区别
- Android四大组件-Broadcast Receiver
- Python学习总结(1)——编程准备和基本语法
- PreScan传感器(零)——通用配置
- 03单点登录CAS5.3.4集成客户端
- ENVI裁剪遥感图像
- KingbaseES和PostgreSQL兼容
- 小米pro蓝牙驱动linux,【小米笔记本蓝牙驱动下载】小米笔记本蓝牙驱动程序官方下载 V20.11 通用版-七喜软件园...
- android照片批量上传照片,一键批量上传手机照片到QQ相册功能 节省手机流量
- Class org.datanucleus.api.jdo.JDOPersistenceManagerFactory was not found
- 潘金莲改变了历史吗 - PostgreSQL舆情事件分析应用
- angular监听输入框值的变化_angular 实时监听input框value值的变化触发函数
- 提高图片的清晰度和加载速度