Hello, everybody
I'm using the following piece of code to get the content of a webpage from python script:
#!/usr/bin/env python
import pycurl
import StringIO
c = pycurl.Curl()
c.setopt(pycurl.URL, "http://google.com")
b = StringIO.StringIO()
c.setopt( c.WRITEFUNCTION, b.write)
#c.setopt(pycurl.COOKIESESSION, True);
c.setopt(pycurl.COOKIEFILE, "/tmp/cookiefile.txt");
c.setopt(pycurl.COOKIEJAR, "/tmp/cookiefile.txt");
c.perform()
page_data = b.getvalue()
For some reason
c.setopt(pycurl.COOKIESESSION, True);
gives an error. Does anybody know if this option is supported in pycurl?
Thanks in advance.