From 40e02d5d28e59dbeb6134afdce12536c602e6aa5 Mon Sep 17 00:00:00 2001 From: Philipp Tanlak Date: Fri, 10 Jan 2025 13:09:50 +0100 Subject: Implement manual following (#82) --- examples/hackernews_manual_follow.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 examples/hackernews_manual_follow.js (limited to 'examples/hackernews_manual_follow.js') diff --git a/examples/hackernews_manual_follow.js b/examples/hackernews_manual_follow.js new file mode 100644 index 0000000..16e7bee --- /dev/null +++ b/examples/hackernews_manual_follow.js @@ -0,0 +1,13 @@ +export const config = { + url: "https://news.ycombinator.com/", + depth: 2, + follow: [], +}; + +export default function({ url, doc, follow }) { + const next = doc.find(".morelink").attr("href"); + + follow(next); + + return { url, next }; +} -- cgit v1.2.3