Current collected state Current
Observed since 20 Oct, 21:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
9gag
Download 9GAG posts and comments
A Node.js package to download 9GAG posts and comments.
It can be used as a module to scrap memes or as a command line application to save data to a local folder and generate an HTML file for offline use.
Node.js 8 or above required due to Async/Await usage.
npm install 9gag
9gag <post_count> [<folder> default:output] [<section> default:hot] [<comment_count> default:0]
9gag 10
9gag 20 output trending 3
# unit
npm run test:unit
# unit + integration
npm test
const NineGag = require('9gag');
const Scraper = NineGag.Scraper;
const Downloader = NineGag.Downloader;
async function memes() {
try {
// number of posts, section and number of comments
// can pass a custom http client as the last Scraper argument
const scraper = new Scraper(10, 'hot', 3);
const posts = await scraper.scrap();
posts.forEach(p => console.log(`${p.title} -> ${p.content} -> ${p.comments.map(c => c.content)[0]}`));
await new Downloader('output').downloadPosts(posts);
}
catch (err) {
console.error(err);
}
}
memes();

Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
fs-extraEnvironment{
"local_name": "fs-extra",
"alias": false,
"peer_metadata": null
} | ^8.1.0 | runtime |
handlebarsEnvironment{
"local_name": "handlebars",
"alias": false,
"peer_metadata": null
} | ^4.7.3 | runtime |
node-fetchEnvironment{
"local_name": "node-fetch",
"alias": false,
"peer_metadata": null
} | ^2.6.0 | runtime |
chaiEnvironment{
"local_name": "chai",
"alias": false,
"peer_metadata": null
} | ^4.2.0 | development |
eslintEnvironment{
"local_name": "eslint",
"alias": false,
"peer_metadata": null
} | ^5.7.0 | development |
mochaEnvironment{
"local_name": "mocha",
"alias": false,
"peer_metadata": null
} | ^5.2.0 | development |
Source distribution
{
"integrity": "sha512-j2FExK2mO/J329Ti+jGqt2mZWOkUsZL/ijmhoJQBWxYuj9w4jodu9o9x8AZiPIrAmUwIHJA88zsAaPD0D6RKvw==",
"shasum": "e5d5b069a95e01969249a6964d95d762b4d3d868",
"tarball": "https://registry.npmjs.org/9gag/-/9gag-4.0.0.tgz",
"fileCount": 23,
"unpackedSize": 1014762,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe39cFCRA9TVsSAnZWagAAkbkP/R0+yC9oT8d1Cekugrh6\nFpGPwCgw80oPl/KShb6Tzf9uXBEDtZZvDY/2acvKfmQEU1RYkFB1FJdUyZmH\nyMwp3J8OBOjbybJYh1MDwPFGtvRBIOHW3fKhdurbaz9qwPobJMAwg9BRhVJJ\nTvHrQxegnCg5IlO8fRgvV1GjjUK9MYvZFfcH0YA+oNm9zAfPxgaGP/9VmT7j\n3N46oD6PKylxqBTc6l6+4p+AYRWokVQQmQ3ml1w6wLaDxenkH5Ur+jgHtemJ\nNGExmez7ie1Zmn8xi8u1BMJ680SuxW/Rx/PPF1uWAacHCIy7D3z9rQJXCWzB\nOWsYfifPQj6dfJzVzLB6DxaretjkU+CmPYLUbheoh0G30EfGcOLP35pHtIdd\nnYZl5+dQNlNZL/rcPz3xEv2iqd6o8ZrCtJVjQmMBIR1MW/Q0TY5CRD2WUmxi\nR9tj+6koZbQNDRuNgTVNld2rxpLAzQOP2RyuWqrIcdPGzPkxaAFxQNzaC15Q\npPCc4npR3wDb9cu02UCdpWrmKypSY7yieEecx1J0STXA3FlDYNeTugh4WECB\nGz+dyo04RYTVPC4TOLRNY/teA72EVdnoQjKOwwWysBye/p1wVq6dwQJMS4iO\nSrT0Ra4l2prXvqqUniBkUYkn6UwZADudhKqtTBXwNyeSEpU0WzDCCbpS6UwQ\ncS6k\r\n=ujxF\r\n-----END PGP SIGNATURE-----\r\n",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEYCIQDxBlA4RafdVCtGH50epHNVmeOn5iLa0Gs/O7zXcrpsbgIhAN7ylsktKuDMx1c3KUDI5sa+G0tqk3jT/vSjgRmvkdee"
}
]
}Observed since 20 Oct, 21:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:c0fe3b85d9dc1b63c7e17f7a916ba32eeb18d3c2ea45b2ec37759be62e0c243e