Back to Crawlee

Using Firefox browser with Playwright crawler

website/versioned_docs/version-3.16/examples/playwright_crawler_firefox.mdx

3.16.0964 B
Original Source

import RunnableCodeBlock from '@site/src/components/RunnableCodeBlock'; import ApiLink from '@site/src/components/ApiLink'; import PlaywrightFirefoxSource from '!!raw-loader!roa-loader!./playwright_crawler_firefox.ts';

This example demonstrates how to use <ApiLink to="playwright-crawler/class/PlaywrightCrawler">PlaywrightCrawler</ApiLink> with headless Firefox browser.

:::tip

To run this example on the Apify Platform, select the apify/actor-node-playwright-firefox image for your Dockerfile.

:::

<RunnableCodeBlock className="language-js"> {PlaywrightFirefoxSource} </RunnableCodeBlock>

To see a real-world example of how to use <ApiLink to="playwright-crawler/class/PlaywrightCrawler">PlaywrightCrawler</ApiLink> in combination with <ApiLink to="core/class/RequestQueue">RequestQueue</ApiLink> to recursively scrape the Hacker News website check out the Playwright crawler example.