Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
docs: add mention about `Request.label` shortcut to the upgrading guide
Martin Adámek897cdcf63ccc
diff --git a/docs/upgrading/upgrading_v3.md b/docs/upgrading/upgrading_v3.mdindex b3282c180..6dccbf87e 100644--- a/docs/upgrading/upgrading_v3.md+++ b/docs/upgrading/upgrading_v3.md@@ -221,6 +221,21 @@ await result.waitForAllRequestsToBeAdded;Previously an error thrown from inside request handler resulted in full error object being logged. With Crawlee, we log only the error message as a warning as long as we know the request will be retried. If you want to enable verbose logging like in v2, use the `CRAWLEE_VERBOSE_LOG` env var.+## `Request.label` shortcut++Labeling requests used to work via the `Request.userData` object. With Crawlee, we can also use the `Request.label` shortcut. It is implemented as a `get/set` pair, using the value from `Request.userData`. The support for this shortcut is also added to the `enqueueLinks` options interface.++```ts+async requestHandler({ request, enqueueLinks }) {+ if (request.label !== 'DETAIL') {+ await enqueueLinks({+ globs: ['...'],+ label: 'DETAIL',+ });+ }+}+```+## Removal of `requestAsBrowser`In v1 we replaced the underlying implementation of `requestAsBrowser` to be just a proxy over calling [`got-scraping`](https://github.com/apify/got-scraping) - our custom extension to `got` that tries to mimic the real browsers as much as possible. With v3, we are removing the `requestAsBrowser`, encouraging the use of [`got-scraping`](https://github.com/apify/got-scraping) directly.