Use existing IE cookie

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Fri Jul 31 15:46:45 EDT 2009


En Thu, 30 Jul 2009 13:31:33 -0300, KB <keith at nekotaku.com> escribió:
> On Jul 30, 9:23 am, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
>> KB wrote:
>>
>> > From the HTTPCookieProcessor doco, it appears that non-IE browsers
>> > have a cookie file (and example code) but from what I can tell IE uses
>> > a hidden folder. (you can set your location in IE but it appends a
>> > folder "\Temporary Internet Files"  -
>>
>> > Not sure how to adapt this for IE.

For IE you may use the pywin32 package:

py> import win32inet
py> win32inet.InternetGetCookie("http://sldm/", None)
'__ac_name="softlab"'

Or use ctypes to call the function of the same name in wininet.dll; see
http://msdn.microsoft.com/en-us/library/aa384710(VS.85).aspx

-- 
Gabriel Genellina




More information about the Python-list mailing list