enqueueLinksByClickingElements help

This is the code :
await utils.puppeteer.enqueueLinksByClickingElements({
page,
requestQueue: RequestQueue.open(),
selector: 'li.pagination_next',
label: 'category',
forefront: true

});
await utils.puppeteer.enqueueLinksByClickingElements({
page,
requestQueue: RequestQueue.open(),
selector: 'li.pagination_next',
label: 'category',
forefront: true

});
This is the error :
Reclaiming failed request back to the list or queue. Expected property object `requestQueue` to have keys `["fetchNextRequest","addRequest"]` in object `options`
Reclaiming failed request back to the list or queue. Expected property object `requestQueue` to have keys `["fetchNextRequest","addRequest"]` in object `options`
I have imported RequestQueue from crawlee, don't understand where it goes wrong
2 Replies
harsh-harlequin
harsh-harlequin2y ago
Hey @NeoNomade, you are missing an await in front of the RequestQueue.open().
NeoNomade
NeoNomadeOP2y ago
stupid me... sorry. thank you very much
Error: Request is already handled!
Error: Request is already handled!

Did you find this page helpful?