urllib2中使用http、https代理
来源:互联网 发布:java认证资格培训 编辑:程序博客网 时间:2024/06/09 20:59
urllib2中使用http、https代理
proxy=urllib2.ProxyHandler({'https': 'http://lk:2002@172.17.5.53:80'})
opener=urllib2.build_opener(proxy)
urllib2.install_opener(opener)
proxy=urllib2.ProxyHandler({'http': 'http://lk:2002@172.17.5.53:80'})
opener=urllib2.build_opener(proxy)
urllib2.install_opener(opener)
>>> urllib2.urlopen('https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=monkey&as_filetype=png&imgtype=clipart&imgc=color&rsz=8')
send: 'GET https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=monkey&as_filetype=png&imgtype=clipart&imgc=color&rsz=8 HTTP/1.1/r/nAccept-Encoding: identity/r/nHost: ajax.googleapis.com/r/nProxy-Authorization: Basic bGs6MjAwMg==/r/nConnection: close/r/nUser-Agent: Python-urllib/2.6/r/n/r/n'
reply: 'HTTP/1.0 200 OK/r/n'
header: Content-Type: text/html
header: Refresh: 0; URL=https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=monkey&as_filetype=png&imgtype=clipart&imgc=color&rsz=8
- urllib2中使用http、https代理
- python使用http、https代理
- python---urllib2使用代理
- python中urllib2高级应用 使用代理 模拟浏览器 cookie
- python HTTP请求---使用urllib2
- CentOS云主机中Nginx正向代理http、https
- linux 下设置 git 使用 http/https 代理(goagent)
- linux 下设置 git 使用 http/https 代理
- 反向代理Https,Tomcat使用http的问题
- NodeJS实现HTTP/HTTPS代理
- NodeJS实现HTTP/HTTPS代理
- nginx 代理http转https
- nginx 反向代理http/https
- 公司http代理访问https代理
- python使用urllib2发送http请求
- Git在http代理中使用ssh
- apache做http和https反向代理
- 为 git 设置 http https 代理
- sse4j
- 让window.event.keyCode兼容Firefox
- 2011年华科计算机考研复试机试题真题
- OpenGL ES之GLSurfaceView学习三:交互式的实例
- qt小结1
- urllib2中使用http、https代理
- 回车+CTRL提交表单
- 如何查看MFC源码
- C#习题练习第二弹!!
- 将自身写入自启动
- Python笔记——python简介、特点、安装及helloworld
- android gallery code part to show a perfect effect
- QtQuick的结构体系小结
- timeSetEvent