推荐学习书目
› 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
ihciah
0.2D
0.03D
V2EX  ›  Python

CookieJar请教!~

  •  
  •   ihciah ·
    ihciah · Nov 17, 2012 · 4233 views
    This topic created in 5062 days ago, the information mentioned may be changed or developed.
    CookieJar的东西如何保存为字符串存储在数据库里?
    怎么从字符串还原回来?
    谢谢
    4 replies  •  1970-01-01 08:00:00 +08:00
    ihciah
        1
    ihciah  
    OP
       Dec 16, 2012
    有人咩~
    VYSE
        2
    VYSE  
       Dec 16, 2012
    可以用FileCookieJar保存到StringIO里
    reorx
        3
    reorx  
       Dec 17, 2012
    用 requests 代替 urllib2 build_opener 之流,没有更好的方法了。CookieJar 自己没有提供导出导入的接口。

    http://gist.github.com/4316909
    ihciah
        4
    ihciah  
    OP
       Dec 18, 2012
    谢谢各位~~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5408 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 532ms · UTC 02:25 · PVG 10:25 · LAX 19:25 · JFK 22:25
    ♥ Do have faith in what you're doing.