diff --git a/templates/ts-crawlee-puppeteer-chrome/README.md b/templates/ts-crawlee-puppeteer-chrome/README.md index d5ea3142..b2af721c 100644 --- a/templates/ts-crawlee-puppeteer-chrome/README.md +++ b/templates/ts-crawlee-puppeteer-chrome/README.md @@ -21,8 +21,8 @@ If you're looking for examples or want to learn more visit: 2. Create a configuration for proxy servers to be used during the crawling with `Actor.createProxyConfiguration()` to work around IP blocking. Use Apify Proxy or your own Proxy URLs provided and rotated according to the configuration. You can read more about proxy configuration [here](https://crawlee.dev/api/core/class/ProxyConfiguration). 3. Create an instance of Crawlee's Puppeteer Crawler with `new PuppeteerCrawler()`. You can pass [options](https://crawlee.dev/api/puppeteer-crawler/interface/PuppeteerCrawlerOptions) to the crawler constructor as: - `proxyConfiguration` - provide the proxy configuration to the crawler - - `requestHandler` - handle each request with custom router defined in the `routes.js` file. -4. Handle requests with the custom router from `routes.js` file. Read more about custom routing for the Cheerio Crawler [here](https://crawlee.dev/api/puppeteer-crawler/function/createPuppeteerRouter) + - `requestHandler` - handle each request with custom router defined in the `routes.ts` file. +4. Handle requests with the custom router from `routes.ts` file. Read more about custom routing for the Cheerio Crawler [here](https://crawlee.dev/api/puppeteer-crawler/function/createPuppeteerRouter) - Create a new router instance with `new createPuppeteerRouter()` - Define default handler that will be called for all URLs that are not handled by other handlers by adding `router.addDefaultHandler(() => { ... })` - Define additional handlers - here you can add your own handling of the page diff --git a/templates/ts-crawlee-puppeteer-chrome/src/main.ts b/templates/ts-crawlee-puppeteer-chrome/src/main.ts index 5d3e34ab..880d7831 100644 --- a/templates/ts-crawlee-puppeteer-chrome/src/main.ts +++ b/templates/ts-crawlee-puppeteer-chrome/src/main.ts @@ -18,7 +18,7 @@ const { // Create a proxy configuration that will rotate proxies from Apify Proxy. const proxyConfiguration = await Actor.createProxyConfiguration(); -// Create a PuppeteerCrawler that will use the proxy configuration and and handle requests with the router from routes.js file. +// Create a PuppeteerCrawler that will use the proxy configuration and and handle requests with the router from routes.ts file. const crawler = new PuppeteerCrawler({ proxyConfiguration, requestHandler: router,