human_requests.tools.helper_tools¶
helper_tools — helper utilities independent of a specific Session: - assembling/merging storage_state (cookies + localStorage) - unified navigation handler with soft retries
Functions¶
|
Reads storage_state from the context and synchronizes internal state: |
|
Unified navigation handler with soft retries for goto/render. |
Module Contents¶
- async merge_storage_state_from_context(
- ctx: playwright.async_api.BrowserContext,
- *,
- cookie_manager: CookieManager,
Reads storage_state from the context and synchronizes internal state: - localStorage: FULL overwrite and returned outward - cookies: ADD/UPDATE in the provided CookieManager
- page: playwright.async_api.Page,
- *,
- target_url: str,
- wait_until: Literal['commit', 'load', 'domcontentloaded', 'networkidle'],
- timeout_ms: int,
- attempts: int,
- on_retry: Callable[[], Awaitable[None]] | None = None,
Unified navigation handler with soft retries for goto/render. Catches ONLY PlaywrightTimeoutError. On retries calls on_retry() (if provided), then performs a reload (soft refresh).