human_requests.abstraction.cookies¶
Classes¶
A dataclass containing the information about a cookie. |
|
Convenient jar-style wrapper + Playwright conversion. |
Module Contents¶
- class Cookie[source]¶
A dataclass containing the information about a cookie.
Please, see the MDN Web Docs for the full documentation: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
- name: str[source]¶
This is the name of the cookie that will be used to identify the cookie in the Cookie header.
- expires: int = 0[source]¶
This is the date when the cookie will be deleted. Coded in Unix timestamp.
- same_site: Literal['Lax', 'Strict', 'None'] = 'Lax'[source]¶
This is the policy that determines whether the cookie will be sent with requests.
- expires_as_datetime() → datetime[source]¶
This is the same as the expires property but as a datetime object.
- max_age_as_datetime() → datetime[source]¶
This is the same as the max_age property but as a datetime object.
- class CookieManager[source]¶
Convenient jar-style wrapper + Playwright conversion.
- get_for_domain(url_or_domain: str) → list[Cookie][source]¶
Get all cookies available for a domain/URL.