Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including paulmbw-hackernews-scrapper with all npm packages installed. Try it out:

var paulmbwHackernewsScrapper = require("paulmbw-hackernews-scrapper")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

paulmbw-hackernews-scrapper v1.0.0

A CLI tool for scrapping posts on hackernews.com

@paulmbw/hackernews-scrapper

A simple CLI tool for scrapping posts on hackernews.com

Installing

Using npm:

$ npm i @paulmbw/hackernews-scrapper

Usage

$ hackernews-scrapper --posts 50

You should be getting a similar output to the one shown below:

[ { by: 'yoaviram',
    descendants: 1,
    id: 18147031,
    kids: [ 18147033 ],
    score: 12,
    time: 1538735685,
    title: 'Show HN: Get organisations to erase your personal data (automated GDPR requests)',
    type: 'story',
    url: 'https://opt-out.eu/' },
  { by: 'zubairq',
    descendants: 4,
    id: 18132526,
    kids: [ 18132544 ],
    score: 2,
    time: 1538587602,
    title: 'Show HN: Build web based SQLite apps and compile to a single HTML file',
    type: 'story',
    url: 'http://appshare.co' }
    ...
    ...]
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free