开发者

transfer cookies from twill to zope

I'm trying to figure out a way to transfer cookies from a Twill browser instance to a Zope browser instance. They both are built on Mechanize, so this should be possible.

I have tried:

zopeBrowser = zope.testbrowser.browser.Browser()
twillBrowser = twill.commands.get_browser()

twillBrowser.go("http://example.com/") #开发者_如何转开发 got some cookies
zopeBrowser.mech_browser._ua_handlers['_cookies'].cookiejar = \
    twillBrowser._browser._ua_handlers['_cookies'].cookiejar

But that doesn't seem to have worked.

Any ideas?

Thanks!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜