Back to Crawlee

Crawl a single URL

website/versioned_docs/version-3.15/examples/crawl_single_url.mdx

3.16.0535 B
Original Source

import RunnableCodeBlock from '@site/src/components/RunnableCodeBlock'; import ApiLink from '@site/src/components/ApiLink'; import CrawlSource from '!!raw-loader!roa-loader!./crawl_single_url.ts';

This example uses the got-scraping npm package to grab the HTML of a web page.

<RunnableCodeBlock className="language-js" type="cheerio"> {CrawlSource} </RunnableCodeBlock>

If you don't want to hard-code the URL into the script, refer to the Accept User Input example.