MCPcopy Create free account
hub / github.com/apify/impit / clear

Method clear

impit-python/python/impit/cookies.py:123–134  ·  view source on GitHub ↗

Delete all cookies. Optionally include a domain and path in order to only delete a subset of all the cookies.

(self, domain: str | None = None, path: str | None = None)

Source from the content-addressed store, hash-verified

121 return None
122
123 def clear(self, domain: str | None = None, path: str | None = None) -> None:
124 """Delete all cookies.
125
126 Optionally include a domain and path in order to only delete a subset of all the cookies.
127 """
128 args = []
129 if domain is not None:
130 args.append(domain)
131 if path is not None:
132 assert domain is not None # noqa: S101
133 args.append(path)
134 self.jar.clear(*args)
135
136 def update(self, cookies: CookieTypes | None = None) -> None: # type: ignore[override]
137 """Update the cookie jar with new cookies. Accepts various types."""

Callers 1

deleteMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected