cheerioScraper
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v1View latest version
This val scrapes a website to extract all the URLs from anchor (<a>
) tags using the cheerio
library.
import scrapeWebsite from 'val:damidina.cheerioScraper';
const urls = await scrapeWebsite('https://example.com');
console.log(urls);