enqueueLinks with urls don't trigger router handle...
# crawlee-js
f
Hello my "search" handler enqueues a url ( I have verified and the url exists and is valid ) to my "subprocessors" handler but for some reasons it's not being triggered
Copy code
js
router.addHandler(
  "search",
  async ({ request, page, log, pushData, enqueueLinks }) => {
    log.info(`Processing ${request.url} ...`);

    // Find all search result items
    const searchElements = await page
      .locator("div#search div#rso div[data-hveid][lang]")
      .all();

    for (let index = 0; index < 1; index++) {
      const element = searchElements[index];

      const url =
        (await element.locator("a").first().getAttribute("href"))

      await enqueueLinks({
        label: "subprocessors",
        urls: [url],
      });
    }

    console.log(await Dataset.getData());
  }
);

// Not triggered
router.addHandler("subprocessors", async ({ request, page, log, pushData }) => {
  log.info(`Processing ${request.url} ...`);
});
a
message has been deleted
a
Different domains maybe? Have you tried with a different
strategy
? Try with
All
, more information here https://crawlee.dev/js/api/core/enum/EnqueueStrategy
f
it worked thanks
a
you're welcome!