from urllib import request #網上很多說的urllib2,在python3中其實就是urllib.request proxy_support = request.ProxyHandler({'http':'http://username:password@IP:port'} ...
from urllib import request
#網上很多說的urllib2,在python3中其實就是urllib.request
proxy_support = request.ProxyHandler({'http':'http://username:password@IP:port'})
auth = request.HTTPBasicAuthHandler()
opener = request.build_opener(proxy_support, auth, request.HTTPHandler)
request.install_opener(opener)
response = request.urlopen("你訪問的rul")
html = response.read()