Skip to main content
Version: Next

fullResultComparator

Callable

  • fullResultComparator(resultA, resultB): boolean

  • An opt-in resultComparator that considers two request handler results equal only if all of their observable effects match - the pushed dataset items, the enqueued requests, and the key-value store changes. This is stricter than the default comparator, which only compares dataset items.

    Beware: enqueued URLs are compared exactly. The same page rendered in a browser and via plain HTTP often yields links that differ only in tracking query parameters, for example:

    • https://sdk.apify.com/docs/guides/getting-started
    • https://sdk.apify.com/docs/guides/getting-started?__hsfp=1136113150&__hssc=7591405.1.173549427712

    Such links are treated as different, which will make the crawler favor browser rendering for those pages.

    Example usage:

    const crawler = new AdaptivePlaywrightCrawler({
    resultComparator: fullResultComparator,
    async requestHandler({ pushData, enqueueLinks }) {
    // ...
    },
    });

    Parameters

    Returns boolean