summaryrefslogtreecommitdiff
path: root/examples/esbuild.github.io.js
blob: 8d2621674984b3c9c71044f0b084be3108a45fd0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { parse } from "flyscrape";

export const options = {
    url: "https://esbuild.github.io/plugins/",
}

export default function({ html }) {
    const doc = parse(html);

    return {
        headline: doc('h1').text().trim(),
        body: doc('main > p:nth-of-type(1)').text().trim(),
    };
}