推荐学习书目
› 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
kingwkb
V2EX  ›  Python

推荐个高级点的http client库

  •  
  •   kingwkb · Mar 14, 2012 · 4531 views
    This topic created in 5308 days ago, the information mentioned may be changed or developed.
    有自动cookie,referer等的
    7 replies  •  1970-01-01 08:00:00 +08:00
    binux
        1
    binux  
       Mar 14, 2012
    requests
    gonbo
        2
    gonbo  
       Mar 14, 2012
    requests有人推荐了。。。
    ayanamist
        3
    ayanamist  
       Mar 14, 2012
    requests貌似是比较好的,还有就是httplib2?
    xoosye
        4
    xoosye  
       Mar 15, 2012
    你用来做什么先?
    kingwkb
        5
    kingwkb  
    OP
       Mar 15, 2012
    @xoosye 登录后完成一系列操作,需要保持session的
    kingwkb
        6
    kingwkb  
    OP
       Mar 15, 2012
    @ayanamist @gonbo @binux
    requests发现一个问题,如果相同域下面有相同的cookie但是path不同的时候,requests处理不了,requests会用最后一个覆盖前一个,这样就造成了cookie丢失的问题,折腾了我1天
    xoosye
        7
    xoosye  
       Mar 15, 2012
    @kingwkb from urllib2 import build_opener,install_opener,HTTPCookieProcessor,Request,urlopen
    或者索性自己处理cookie吧,想怎么整都行
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2625 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 02:30 · PVG 10:30 · LAX 19:30 · JFK 22:30
    ♥ Do have faith in what you're doing.