python浏览器怎么设置_在python中为IE浏览器设置selenium代理

我的问题是在python(3.6)中为IE浏览器设置selenium编码的代理。from selenium import webdriver

PROXY = "94.56.171.137"

PORT = 8080

base_url = "https://google.com"

desired_capability = webdriver.DesiredCapabilities.INTERNETEXPLORER

desired_capability['proxy'] = {

"proxyType": "manual",

"httpProxy": PROXY,

"httpProxyPort": PORT,

"ftpProxy": PROXY,

"ftpProxyPort": PORT,

"sslProxy": PROXY,

"sslProxyPort": PORT,

"class":"org.openqa.selenium.Proxy",

}

driver = webdriver.Ie(executable_path='C:\\tmp\\IEDriverServer',capabilities=desired_capability)

driver.get(base_url)

我收到以下错误消息-

^{pr2}$

我引用了以下内容-https://stackoverflow.com/questions/45949274/setting-proxy-in-selenium-in-python-for-firefox-geckodriver?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

它在FireFox浏览器中运行良好,但我无法在IE浏览器中运行。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值