1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { fetch } from "https://esm.town/v/std/fetch";
export let denoImportEx = (async () => {
const { DOMParser } = await import(
"https://deno.land/x/deno_dom/deno-dom-wasm.ts"
);
const url = "https://blog.samaltman.com/how-to-be-successful";
const res = await fetch(
"https://extractus.deno.dev/extract?apikey=rn0wbHos2e73W6ghQf705bdF&type=article&url=" +
url
);
const json = await res.json();
const doc = new DOMParser().parseFromString(json.data.content, "text/html")
.documentElement.textContent;
return doc;
})();