python - 使用 selenium webdriver 在 firefox 中打开 www.google.com 而不是 www.google.co.in

标签 python cookies proxy selenium-webdriver google-search

在使用 Selenium Webdriver(带有 Python 绑定(bind))运行测试时,我需要打开 www.google.com 而不是本地化版本的 google。 使用代理是一种选择,但当我使用代理时,页面加载速度非常慢。有没有其他方法可以实现这一目标? 提前致谢。

最佳答案

刚打开http://www.google.com/ncr而不是 http://www.google.com ,这将执行无国家/地区重定向(或 NCR 代表的任何内容)

关于python - 使用 selenium webdriver 在 firefox 中打开 www.google.com 而不是 www.google.co.in,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23856137/

相关文章:

python - 在 Python 中使用 Selenium 访问 Tor

python - 如何打印一个字符串以在打印输出中包含多行

python - Python 优先级队列中的 A* 搜索

javascript - 带有编码字符的 Angular cookie

OAuth2RestTemplate 中的代理配置

proxy - 如何使用 ionic2 配置代理?

python - 索引错误 : list index out of range (Python)

python - 将列表的列表转换为元组列表的列表

javascript - PHP/JavaScript cookie 的作用就像一个指针,因此当我清除它时,我会丢失该值;如何从 cookie 中获取值?

javascript - 如何在浏览器关闭时删除cookie? ASP.NET核心,C#