views:

70

answers:

2

Hello, how can I delete IE 8 cookies for a certain site from Python? TIA

A: 

I've found out that under Windows seven cookies are stored in

C:\Users(user)\AppData\Roaming\Microsoft\Windows\Cookies

in format (user)@host[\d].txt, so I guess just deleting the corresponding file is way to go.

roddik
+1  A: 

It is probably cleaner and less error prone to use the Python standard library module: cookielib this provides functions to manipulate cookies in various ways.

Unfortunately to use this with IE consider the third party extension to this module: Client Cookie. This module contains various "cookie jars" such as MSIECookieJar which is what you probably want but also MozillaCookieJar. This module does not necessarily work with all version of IE but is worth a look.

Tendayi Mawushe