ordinary-sapphireO

Is it possible to get the selector of the individual links when using enqueueLinks()?

await enqueueLinks({
  selector: 'a',
  strategy: 'same-hostname',
  forefront: true,
  transformRequestFunction: (request) => {
    request.userData.parentUrl = page.url();
    request.userData.subRequest = true;
    request.userData.linkSelector = xxx; // <-- Is it possible to save the selectors of each link?

    return request;
  },
});
Was this page helpful?