fromURL loads a document from a URL.
fromURL
By default, redirects are allowed and non-2xx responses are rejected.
The URL to load the document from.
Optional
The options to pass to Cheerio.
The loaded document.
import * as cheerio from 'cheerio';const $ = await cheerio.fromURL('https://example.com'); Copy
import * as cheerio from 'cheerio';const $ = await cheerio.fromURL('https://example.com');
fromURLloads a document from a URL.By default, redirects are allowed and non-2xx responses are rejected.