curl-and-python
cookies rejected
Date: Fri, 17 Sep 2004 18:16:54 +0530
Hi,
I'm trying to make an autologin script for yahoo mail.
but when i try to sign in yahoo says "cookies rejected"
but cookies are getting stored in the file i specified. !!!
The relevant portion of my code is below
html = Test()
url = "http://login.yahoo.com/config/login"
form_data = ".src=ym&.js=1&.challenge='" + challenge +
"&login=login&passwd=" + response
c = pycurl.Curl()
c.setopt(c.POST, 1)
c.setopt(c.URL,url )
c.setopt(c.USERAGENT, "User-Agent: Mozilla/5.0 (X11; U; Linux; en-US)
Gecko/2004 Firefox/0.9")
c.setopt(c.FOLLOWLOCATION,1);
c.setopt(c.HEADER,1);
c.setopt(c.POSTFIELDS,form_data);
c.setopt(c.COOKIEJAR,cookie_file);
c.setopt(c.COOKIEFILE,cookie_file);
c.setopt(c.PROXY,"http://10.7.0.1:9090")
c.setopt(c.WRITEFUNCTION, html.body_callback)
c.perform()
c.close()
file = open("yahoo2.html","w")
file.write(html.contents)
file.close
libcurl-version 7.12.0
Slackware-10
(the login to yahoo works..only if the login is successfull the cookie
will be set.
i made a similar program using PHP and it works(it uses a different
libcurl vesrion libcurl 7.9.8)
Regards
Manu
-- The shortest route to my heart is through my inbox _______________________________________________ http://cool.haxx.se/mailman/listinfo/curl-and-pythonReceived on 2004-09-17