wet-aquaW
Apify & Crawlee4y ago
4 replies
wet-aqua

Failed request expected type of list but received object

Hello,
I am adding a list to crawler.addRequests() but I still get the error which you can see in the header.

 if (directRequests.length > 0) {
    await crawler.addRequests(directRequests);
} else {
 start crawling
    await crawler.addRequests([{
        url: SITE_ORIGIN,
        label: LABEL_CATEGORY,
    }]);


Here is the full ERROR message:

 INFO  Page opened. {"label":"category","url":"https://www.hanwha-security.eu"}
WARN  CheerioCrawler: Reclaiming failed request back to the list or queue. Expected `requests` to be of type `array` but received type `Object


How can I parse a list and not an object?
Any suggestions?

Many thanks in advance!
Was this page helpful?