我试图让这个简单的代码到达互联网。我在代理服务器后面,但我已经设置了我的 http_proxy、https_proxy 和 no_proxy 环境变量。
Python代码:
from selenium import webdriver
driver = webdriver.PhantomJS()
driver.get('http://www.google.com')
driver.page_source
输出:
u'<html><head><title> Web Authentication Redirect</title><meta http-equiv="Cache-control" content="no-cache"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Expires" content="-1"><meta http-equiv="refresh" content="1; URL=https://1.1.1.1/login.html?redirect=www.google.com/"></head><body>\n</body></html>'
关于如何解决这个问题的任何想法?
另外,我在 Ubuntu 12.04 LTS 上。