linux安装chrome
1.安装chrome
yum install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
2.查看chrome版本
google-chrome
3.下载安装chromedriver
方式一
选择对应chrome版本或者相近的chromedriver版本下载到本地在上传到linux
http://npm.taobao.org/mirrors/chromedriver
方式二
wget http://npm.taobao.org/mirrors/chromedriver/104.0.5112.79/chromedriver_linux64.zip
3.解压
unzip chromedriver_linux64.zip
4.移动到/usr/bin目录下
mv chromedriver /usr/bin/
5.给执行权限
chmod +x /usr/bin/chromedriver
6.检查版本
chromedriver --version
7.linux下使用
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-gpu')
browser = webdriver.Chrome(options=chrome_options)
browser.get('https://www.baidu.com')
print(browser.page_source)
linux安装chrome相关推荐
- linux安装chrome及其驱动
1.安装chrome wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm yum insta ...
- CentOS(Linux)安装Chrome浏览器
步骤一:下载Chrome安装包 wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm 此步骤因 ...
- Linux安装chrome的两个方法
一.Chromium vs Chrome Chromium与Chrome的差异主要表现在以下方面: 1.程序图标:两者图标只在色彩上不同,Chromium是天蓝色,而Chrome是Google公司的代 ...
- Linux安装Chrome及依赖解决
安装Chrome 下载Chrome rpm包 https://www.google.com/chrome/ 安装 [root@localhost opt]# rpm -ivh google-chrom ...
- Linux安装Chrome和chromedriver进行截图
1.自动下载google-chrome: curl https://intoli.com/install-google-chrome.sh | bash 或者下载rpm版本的chrome然 ...
- linux安装chrome浏览器并初步使用
目录 一.背景 二.资源包内容 三.安装步骤 四.python第三方包安装 五.chromdriver.exe驱动安装 六.python调用谷歌浏览器 一.背景 使用selenium做爬虫,现移植到l ...
- linux安装chrome浏览器
1. 从google官方网站下载google chrome安装包 http://www.google.cn/chrome/browser/desktop/index.html 选择linux系统,并下 ...
- 无图形界面Linux安装chrome实现自动化测试
文章目录 前言 一.安装 二.测试 前言 记录在无图形界面的环境下,实现自动化测试的方法.环境:云服务器ubuntu,使用xshell连接.$ :本文表示在命令行中输入. 一.安装 1.在服务器中安装 ...
- Linux: debian,ubuntu命令行安装chrome/chromium
debian,ubuntu通过终端安装chrome/chromium 直接安装chrome 运行如下命令: wget https://dl.google.com/linux/direct/google ...
最新文章
- python Unicode转ascii码的一种方法
- md5sum算法 —— linux或Unix上,md5sum是用来计算和校验文件报文摘要的工具程序
- 随便写写的正则表达式
- [react] 在React项目中你用过哪些动画的包?
- 手机java软件_浅谈软件开发就业前景
- 15张图呈现数据库事务背后的并发原理
- MySQL高级知识(十三)——表锁
- 算法洗脑系列(8篇)——第八篇 概率思想
- 【动态规划】状压dp:蓝桥2020补给(旅行商问题)
- Atitit.dwr3 不能显示错误详细信息的解决方案,控件显示错误详细信息的解决方案 java .net php
- Cisco ASA 5505 (Version 9.X)的 LAN上网和NAT的配置
- 0x00007FFFA8336AC5 (msvcr120d.dll) (ConsoleApplication1.exe 中)处有未经处理的异常: 0xC0000005 错误
- 二路归并排序Python实现-II
- 解决nacos不停刷日志 ClientWorker get changedGroupKeys:[] 问题
- Linux打字游戏程序代码,c语言shell打字游戏.pdf
- 哈佛结构与冯诺依曼结构(含STM32系统结构解析)
- MySQL医疗信息管理系统数据库(源码)
- CTF密码学-编码基础知识点总结
- 计算机文件共享xp,两台XP怎么共享文件
- 吉时利Keithley软件2600系列2635B|2636B|2651A|2657A NS-SourceMeter源表软件