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 |
|---|---|---|
axiosEnvironment{
"local_name": "axios",
"alias": false,
"peer_metadata": null
} | ^0.17.0 | runtime |
fs-extraEnvironment{
"local_name": "fs-extra",
"alias": false,
"peer_metadata": null
} | ^4.0.2 | runtime |
handlebarsEnvironment{
"local_name": "handlebars",
"alias": false,
"peer_metadata": null
} | ^4.0.11 | runtime |
chaiEnvironment{
"local_name": "chai",
"alias": false,
"peer_metadata": null
} | ^4.1.2 | development |
eslintEnvironment{
"local_name": "eslint",
"alias": false,
"peer_metadata": null
} | ^4.10.0 | development |
mochaEnvironment{
"local_name": "mocha",
"alias": false,
"peer_metadata": null
} | ^4.0.1 | development |
Source distribution
{
"integrity": "sha512-RlbEtvz7m28ikSNSTy8ad/xGaOMHNkcczkG2HQ+1j1vkJPQYBFDC7s5kYTeOVFmy0iYH7vrLv1sqDbgrS+8Q0A==",
"shasum": "039cc60dcc40b020a5c4f3799443f8c4d2414c85",
"tarball": "https://registry.npmjs.org/9gag/-/9gag-2.0.0.tgz",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEQCIC1RY7wPOSEnRCqB06/zdJJXJlLq2QH+YVI0pC5G45SAAiBxy0FVeJTPLFMfyGp2HatjPhHuQDcdlN1SgXSWpYY8Ig=="
}
]
}Observed since 20 Oct, 21:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:038fdee0dfde3fc681040dc52a29c349fa13f73a7ade3cdec33707f35baf60a7