curl-and-python

Re: Help with cookies

From: Kjetil Jacobsen <kjetilja_at_gmail.com>
Date: Wed, 12 Dec 2007 19:50:49 +0100

hi,

use pycurl.INFO_COOKIELIST for getinfo.

    - kjetil

On Dec 12, 2007 7:18 PM, Nathan C. Tresch <ntresch_at_hotmail.com> wrote:
>
>
> Further, this is what I'm trying:
>
> self.c=pycurl.Curl()
> self.c.setopt(pycurl.FOLLOWLOCATION, 1);
> self.c.setopt(pycurl.VERBOSE, int(self.__verbose));
> self.c.setopt(pycurl.HEADER, 1);
> # self.c.setopt(pycurl.RETURNTRANSFER, 1);
> self.c.setopt(pycurl.USERAGENT, self.__userAgent);
>
> self.cookieFile=tempfile.NamedTemporaryFile(prefix=getURL.COOKIEFILE_PREFIX)
> self.c.setopt(pycurl.COOKIEFILE, self.cookieFile.name);
> self.c.setopt(pycurl.COOKIEJAR, self.cookieFile.name);
>
> Then, later, I do this:
>
> print self.c.getinfo(pycurl.COOKIELIST)
>
>
> What I get is:
>
> ValueError: invalid argument to getinfo
>
>
> Can anyone tell me what I'm doing wrong?
>
>
> ----- Original Message -----
> From: Nathan C. Tresch
> To: curl with python
> Sent: Wednesday, December 12, 2007 9:16 AM
> Subject: Help with cookies
>
>
> Can anyone tell me how to access the cookies stored by a given pycurl
> instance?
>
> ________________________________
>
>
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
>
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
>
>
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2007-12-12