Save cookies using share object.

From: Antonio B <>
Date: Mon, 2 Mar 2009 15:41:12 -0800 (PST)

Hi All:

I'm using this piece of code:
        import pycurl

        s = pycurl.CurlShare()
        s.setopt(pycurl.SH_SHARE, pycurl.LOCK_DATA_COOKIE)

        c = pycurl.Curl()
        c.setopt(pycurl.URL, '')
        c.setopt(pycurl.SHARE, s)

        c1 = pycurl.Curl()
        c1.setopt(pycurl.URL, '')
        c1.setopt(pycurl.SHARE, s)


It can handle the cookies and share them between easy interfaces, even in in multiple interfaces; but it can save them in a cookie file. I'll try to use COOKIEFILE or COOKIEJAR as options in the easy interfaces, but it doesn't work either; in fact it doesn't matter if I use this options.

Thanks and any help will be appreciated.


Received on 2009-03-03