http.cookiejar.CookieJar.extract_cookies()

CookieJar.extract_cookies(response, request) Extract cookies from HTTP response and store them in the CookieJar, where allowed by policy. The CookieJar will look for allowable Set-Cookie and Set-Cookie2 headers in the response argument, and store cookies as appropriate (subject to the CookiePolicy.set_ok() method’s approval). The response object (usually the result of a call to urllib.request.urlopen(), or similar) should support an info() method, which returns an email.message.Message insta

http.cookiejar.Cookie.secure

Cookie.secure True if cookie should only be returned over a secure connection.

http.cookiejar.Cookie.version

Cookie.version Integer or None. Netscape cookies have version 0. RFC 2965 and RFC 2109 cookies have a version cookie-attribute of 1. However, note that http.cookiejar may ‘downgrade’ RFC 2109 cookies to Netscape cookies, in which case version is 0.

http.cookiejar.Cookie.set_nonstandard_attr()

Cookie.set_nonstandard_attr(name, value) Set the value of the named cookie-attribute.

http.cookiejar.Cookie.rfc2109

Cookie.rfc2109 True if this cookie was received as an RFC 2109 cookie (ie. the cookie arrived in a Set-Cookie header, and the value of the Version cookie-attribute in that header was 1). This attribute is provided because http.cookiejar may ‘downgrade’ RFC 2109 cookies to Netscape cookies, in which case version is 0.

http.cookiejar.Cookie.value

Cookie.value Cookie value (a string), or None.

http.cookiejar.Cookie.path

Cookie.path Cookie path (a string, eg. '/acme/rocket_launchers').

http.cookiejar.Cookie.name

Cookie.name Cookie name (a string).

http.cookiejar.Cookie.is_expired()

Cookie.is_expired(now=None) True if cookie has passed the time at which the server requested it should expire. If now is given (in seconds since the epoch), return whether the cookie has expired at the specified time.

http.cookiejar.Cookie.port_specified

Cookie.port_specified True if a port or set of ports was explicitly specified by the server (in the Set-Cookie / Set-Cookie2 header).