
获得徽章 0
96版谷歌对不支持https的网站不友好,一般网站是可以打开的,但有些网站不行,要cmd运行。如:
start chrome.exe --unsafely-treat-insecure-origin-as-secure="目标网站"
但对selenium就麻烦了,要么换火狐浏览器,要么用旧版谷歌,而且还要禁止自动更新。
我该如何修改以下代码才能利用cmd打开网站呢?
from selenium import webdriver
from selenium.webdriver.chrome import options
from selenium.webdriver.chrome.options import Options
chrome_options=Options()
chrome_options.add_argument=' --unsafely-treat-insecure-origin-as-secure="http://目标网址"'
driver=webdriver.Chrome('d:/xxx/chromedriver.exe',options=chrome_options)
driver.get("http://目标网址")
start chrome.exe --unsafely-treat-insecure-origin-as-secure="目标网站"
但对selenium就麻烦了,要么换火狐浏览器,要么用旧版谷歌,而且还要禁止自动更新。
我该如何修改以下代码才能利用cmd打开网站呢?
from selenium import webdriver
from selenium.webdriver.chrome import options
from selenium.webdriver.chrome.options import Options
chrome_options=Options()
chrome_options.add_argument=' --unsafely-treat-insecure-origin-as-secure="http://目标网址"'
driver=webdriver.Chrome('d:/xxx/chromedriver.exe',options=chrome_options)
driver.get("http://目标网址")
展开
评论
1
赞了这篇文章
赞了这篇文章
赞了这篇文章
前几天还好好的,今天登陆某办公网,老提示安装PNXClient.exe这个东东,安装N次还是不显示账号密码验证码,导致无法登陆。其他同事都可以的,只有我不能继续使用谷歌、微软浏览器登陆,火狐、IE是可以的。这一般是什么回事?
2
点赞
赞了这篇文章
赞了这篇文章