2023-01-23 04:37:12 +01:00
|
|
|
import cheerio from "https://esm.sh/cheerio";
|
|
|
|
|
2023-01-23 03:37:00 +01:00
|
|
|
export async function loadJSONUrl(url) {
|
|
|
|
const resp = await fetch(url);
|
2023-01-23 04:37:12 +01:00
|
|
|
return resp.json();
|
|
|
|
}
|
|
|
|
|
|
|
|
export async function loadHtmlUrl(url) {
|
|
|
|
const resp = await fetch(url);
|
|
|
|
return cheerio.load(await resp.text());
|
2023-01-23 03:37:00 +01:00
|
|
|
}
|