Module grab.cookie¶
This module contains some classes to work with cookies.
Creates cookielib.Cookie instance
Each Grab instance has cookies attribute that is instance of CookieManager class.
That class contains helpful methods to create, load, save cookies from/to different places.
Initialize self. See help(type(self)) for accurate signature.
Add new cookie or replace existing cookie with same parameters.
Parameters: - name – name of cookie
- value – value of cookie
- kwargs – extra attributes of cookie
Implements dict interface, allows to get cookie value by its name.
Load cookies from the file.
Content of file should be a JSON-serialized list of dicts.
Dump all cookies to file.
Cookies are dumped as JSON-serialized dict of keys and values.