hey, the request data is stored in
crawlingContext.request
, which is accessible from your
requestHandler
:
const crawler = new PuppeteerCrawler({
requestHandler: async (crawlingContext) => {
const { url } = crawlingContext.request;
...
await Dataset.pushData({ ...data, url });
},
};
According to the docs (
https://crawlee.dev/api/3.10/core/class/Request#handledAt),
handledAt
is set after the request is processed, so it'll be always
undefined
in your
requestHandler
. However, you can just use
new Date().toISOString()
to create your own timestamp.