1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { Readability } from "npm:@mozilla/readability";
import jsdom from "npm:jsdom";
const JSDOM = jsdom.JSDOM;
let resp = await fetch("https://tratt.net/laurie/blog/2024/some_reflections_on_writing_unix_daemons.html");
let body = await resp.text();
let doc = new JSDOM(body);
let reader = new Readability(doc.window.document);
let article = reader.parse();
console.log(article.textContent);
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
v9
March 1, 2024