开发者

How to delete a certain IE cookie from python?

how 开发者_JAVA百科can I delete IE 8 cookies for a certain site from Python?


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜