summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPhilipp Tanlak <philipp.tanlak@gmail.com>2023-08-17 20:18:55 +0200
committerPhilipp Tanlak <philipp.tanlak@gmail.com>2023-08-17 20:18:55 +0200
commit8f55226a53682f9f4a0b63778b3338451605a6c3 (patch)
treed435e924de369cebbbe66449f2cd82f79b6c0300 /examples
parent5e2b1d1dc902ba53fc537b31e835d82c0e55dfb6 (diff)
add timestamp
Diffstat (limited to 'examples')
-rw-r--r--examples/esbuild.github.io.js20
-rw-r--r--examples/pkg.go.dev.js22
2 files changed, 0 insertions, 42 deletions
diff --git a/examples/esbuild.github.io.js b/examples/esbuild.github.io.js
deleted file mode 100644
index 7839791..0000000
--- a/examples/esbuild.github.io.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import { parse } from "flyscrape";
-
-export const options = {
- url: "https://esbuild.github.io/plugins/",
- depth: 1,
- rate: 100,
- allowedDomains: [
- "esbuild.github.io",
- "nodejs.org",
- ],
-}
-
-export default function({ html }) {
- const doc = parse(html);
-
- return {
- headline: doc('h1').text().trim(),
- body: doc('main > p:nth-of-type(1)').text().trim(),
- };
-}
diff --git a/examples/pkg.go.dev.js b/examples/pkg.go.dev.js
deleted file mode 100644
index 12aa308..0000000
--- a/examples/pkg.go.dev.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import { parse } from "flyscrape";
-
-export const options = {
- url: "https://pkg.go.dev/github.com/stretchr/testify/require",
-}
-
-export default function({ html }) {
- const $ = parse(html);
-
- return {
- package: $('h1').text().trim(),
- meta: {
- version: $('[data-test-id=UnitHeader-version] > a').text().replace("Version: ", "").trim(),
- license: $('[data-test-id=UnitHeader-licenses] > a').text().trim(),
- published: $('[data-test-id=UnitHeader-commitTime]').text().replace("Published: ", "").trim(),
- imports: $('[data-test-id=UnitHeader-imports] > a').text().replace("Imports: ", "").trim(),
- importedBy: $('[data-test-id=UnitHeader-importedby] > a').text().replace("Imported by: ", "").replace(/,/g,"").trim(),
- },
- functions: $('.Documentation-indexList .Documentation-indexFunction > a').toArray().map(el => $(el).text()),
- types: $('.Documentation-indexList .Documentation-indexType > a').toArray().map(el => $(el).text()),
- };
-}