Crawl a single URL
This example uses the got-scraping npm package
to grab the HTML of a web page.
Run on
import { gotScraping } from 'got-scraping';
// Get the HTML of a web page
const { body } = await gotScraping({ url: 'https://www.example.com' });
console.log(body);
If you don't want to hard-code the URL into the script, read it from a command-line argument or an environment variable, or, on the Apify platform, from the Actor input with Actor.getInput().