http

Skip Montanaro skip at pobox.com
Wed Jul 25 10:49:28 EDT 2001


    raghu> i do successfully get the home page of the server (yahoo) that i
    raghu> am sending my http 'GET' request but i get the following response

    raghu> We need to use "cookies" to identify u on our system.....

    raghu> how do i make modification in my program to ACCEPT COOKIES from a
    raghu> server and at which instance i shall do this either at the first
    raghu> 'GET' request when requesting for the home page of at the 'POST'
    raghu> request in my case urlopen or both the times

Check out the Cookie module in the Python distribution:

   http://www.python.org/doc/current/lib/module-Cookie.html

It includes a simple example of how to use cookies from Python.  If you
already have cookies in a file (from your interactive browser, perhaps), you
can parse its contents and send the appropriate cookie info along with the
original request.

-- 
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/




More information about the Python-list mailing list