http

Andrew Markebo flognat at flognat.myip.org
Wed Jul 25 17:05:21 EDT 2001


You need to grab the cookies from the headers of the retrieved
webpage, (headerline starting with Set-cookie), and then when you
compose the answer, urllib.URLopener has a function addheader where
you put in the headers telling the server which cookies you have.. 

Basically, the order for yahoo is something like
     * Post your form
     * You will receive a redirection status with cookies in 
       the header
     * get the page redirected to (groups.yahoo.com) and send the
       cookies to the server.. 
     * Now you can navigate around with the cookies on yahoo and 
       read your mail, access your groups.. 

By chance I am actually playing around with an yahoo client, using my
own http and socket modules, a first getting started can be found at:

        http://flognat.myip.org/hacks/yah.tgz

        /Andy

/ "raghu k rao" <krag_rao_pyt at rediffmail.com> wrote:
|
| [...] 
| how do i make modification in my program to ACCEPT COOKIES  from a server and at which instance i shall do this either at the first 'GET' request 
| when requesting for the home page of at the 'POST' request  in my case urlopen or both the times 
| 



More information about the Python-list mailing list