我試圖讓這個簡單的代碼到達Internet。我在代理服務器後面,但是我已經設置了我的http_proxy,https_proxy和no_proxy環境變量。爲什麼我的基於Python的Selenium PhantomJS webcrawler不能到達網絡?
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上。