首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
推荐学习书目
›
Learn Python the Hard Way
Python Sites
›
PyPI
- Python Package Index
›
http://diveintopython.org/toc/index.html
›
Pocoo
值得关注的项目
›
PyPy
›
Celery
›
Jinja2
›
Read the Docs
›
gevent
›
pyenv
›
virtualenv
›
Stackless Python
›
Beautiful Soup
›
结巴中文分词
›
Green Unicorn
›
Sentry
›
Shovel
›
Pyflakes
›
pytest
Python 编程
›
pep8 Checker
Styles
›
PEP 8
›
Google Python Style Guide
›
Code Style from The Hitchhiker's Guide
V2EX
›
Python
推荐个高级点的http client库
kingwkb
·
2012-03-14 11:10:19 +08:00
· 3934 次点击
这是一个创建于 4928 天前的主题,其中的信息可能已经有所发展或是发生改变。
有自动cookie,referer等的
referer
HTTP
cookie
7 条回复
•
1970-01-01 08:00:00 +08:00
1
binux
2012-03-14 11:30:29 +08:00
requests
2
gonbo
2012-03-14 11:31:19 +08:00
requests有人推荐了。。。
3
ayanamist
2012-03-14 15:34:58 +08:00
requests貌似是比较好的,还有就是httplib2?
4
xoosye
2012-03-15 15:19:41 +08:00
你用来做什么先?
5
kingwkb
OP
2012-03-15 16:08:38 +08:00
@
xoosye
登录后完成一系列操作,需要保持session的
6
kingwkb
OP
2012-03-15 16:10:50 +08:00
@
ayanamist
@
gonbo
@
binux
requests发现一个问题,如果相同域下面有相同的cookie但是path不同的时候,requests处理不了,requests会用最后一个覆盖前一个,这样就造成了cookie丢失的问题,折腾了我1天
7
xoosye
2012-03-15 19:55:33 +08:00
@
kingwkb
from urllib2 import build_opener,install_opener,HTTPCookieProcessor,Request,urlopen
或者索性自己处理cookie吧,想怎么整都行
关于
·
帮助文档
·
自助推广系统
·
博客
·
API
·
FAQ
·
实用小工具
·
3019 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 23ms ·
UTC 13:00
·
PVG 21:00
·
LAX 06:00
·
JFK 09:00
Developed with
CodeLauncher
♥ Do have faith in what you're doing.
❯