MCPcopy Create free account
hub / github.com/apify/crawlee-python / CookieParam

Class CookieParam

src/crawlee/sessions/_cookies.py:17–42  ·  view source on GitHub ↗

Dictionary representation of cookies for `SessionCookies.set` method.

Source from the content-addressed store, hash-verified

15
16@docs_group('Session management')
17class CookieParam(TypedDict, total=False):
18 """Dictionary representation of cookies for `SessionCookies.set` method."""
19
20 name: Required[str]
21 """Cookie name."""
22
23 value: Required[str]
24 """Cookie value."""
25
26 domain: NotRequired[str]
27 """Domain for which the cookie is set."""
28
29 path: NotRequired[str]
30 """Path on the specified domain for which the cookie is set."""
31
32 secure: NotRequired[bool]
33 """Set the `Secure` flag for the cookie."""
34
35 http_only: NotRequired[bool]
36 """Set the `HttpOnly` flag for the cookie."""
37
38 expires: NotRequired[int]
39 """Expiration date for the cookie, None for a session cookie."""
40
41 same_site: NotRequired[Literal['Lax', 'None', 'Strict']]
42 """Set the `SameSite` attribute for the cookie."""
43
44
45class PlaywrightCookieParam(TypedDict, total=False):

Callers 7

session_directFunction · 0.90
session_args_camelFunction · 0.90
session_args_snakeFunction · 0.90
cookie_dictFunction · 0.90
test_convert_dict_formatFunction · 0.90
_from_playwrightMethod · 0.85

Calls

no outgoing calls

Tested by 5

session_directFunction · 0.72
session_args_camelFunction · 0.72
session_args_snakeFunction · 0.72
cookie_dictFunction · 0.72
test_convert_dict_formatFunction · 0.72