UNPKG

itch-scraper

Version:

Itch scraper is a scraping tool to get data from itch.io pages.

11 lines (8 loc) 276 B
import axios from 'axios'; import * as cheerio from 'cheerio'; export const loadPage = async (url: string) => { const page = await axios.get(url).catch((err) => { throw new Error(`Error while fetching page: ${err.message}`); }); return cheerio.load(page.data); };