Skip to main content
Version: Next



  • extractUrlsFromCheerio($: CheerioAPI, selector?: string, baseUrl?: string): string[]

  • Extracts URLs from a given Cheerio object.


    when a relative URL is encountered with no baseUrl set


    • $: CheerioAPI

      the Cheerio object to extract URLs from

    • selector: string = 'a'

      a CSS selector for matching link elements

    • baseUrl: string = ''

      a URL for resolving relative links

    Returns string[]

    An array of absolute URLs