From a9b61f84070cc7ca0d6e26f187c745619a91422a Mon Sep 17 00:00:00 2001 From: Philipp Tanlak Date: Thu, 27 Jul 2023 19:03:41 +0200 Subject: init --- examples/esbuild.github.io.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 examples/esbuild.github.io.js (limited to 'examples/esbuild.github.io.js') diff --git a/examples/esbuild.github.io.js b/examples/esbuild.github.io.js new file mode 100644 index 0000000..8d26216 --- /dev/null +++ b/examples/esbuild.github.io.js @@ -0,0 +1,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(), + }; +} -- cgit v1.2.3