我想通過urllib獲取一些網址,並通過我的代理機械化。Python urllib代理
隨着機械化我嘗試以下方法:
from mechanize import Browser
import re
br = Browser()
br.set_proxies({"http": "MYUSERNAME:*******@itmalsproxy.italy.local:8080"})
br.open("http://www.example.com/")
我得到以下錯誤:
httperror_seek_wrapper: HTTP Error 407: Proxy Authentication Required (The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.
作爲代理,用戶名和密碼是否正確,可能是什麼問題呢?
感謝您的建議,我嘗試了http://code.google.com/p/python-ntlm/,仍然得到相同的錯誤 – pistacchio
我不相信python-ntlm支持NTML代理(只有直接的HTTP連接)。你有沒有試過NTLM授權代理服務器? – codeape
我試過了,它不是ntlm代理 – pistacchio