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

Function pre_hook

tests/unit/crawlers/_playwright/test_playwright_crawler.py:788–790  ·  view source on GitHub ↗
(context: PlaywrightPreNavCrawlingContext)

Source from the content-addressed store, hash-verified

786
787 @crawler.pre_navigation_hook
788 async def pre_hook(context: PlaywrightPreNavCrawlingContext) -> None:
789 send_request_response = await context.send_request(str(server_url / 'user-agent'))
790 check_data['pre_send_request'] = dict(json.loads(await send_request_response.read()))
791
792 @crawler.post_navigation_hook
793 async def post_hook(context: PlaywrightPostNavCrawlingContext) -> None:

Callers

nothing calls this directly

Calls 2

send_requestMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected