浏览器cookie管理
cookie-eater的Python项目详细描述
浏览器cookie管理
概述
Firefox和Chrome cookie管理。(chrome需要sqlite 3.8或更高版本。)
安装
pip install cookie-eater
CI测试运行于:
- Python2.6+
- Python3.3+
- 皮比
示例用法
importcookie_eaterfox=cookie_eater.FirefoxCookies()# Automatically uses the DB of the default profile, can specify db=<path>fox.add_cookie("example.com","MyCookie","Cookie contents!")fox.find_cookies(host="Example")# [{'host': u'example.com', 'name': u'MyCookie', 'value': u'Cookie contents!'}]fox.delete_cookie("example.com","MyCookie")