diff options
Diffstat (limited to 'examples/hackernews_manual_follow.js')
| -rw-r--r-- | examples/hackernews_manual_follow.js | 13 |
1 files changed, 13 insertions, 0 deletions
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 }; +} |