9gscraper
A nodejs package to scrape 9gag posts and comments.
Documentation
getFeed([options])
-
options
{Object} an object containing: section, batchSize and limit.- section {String} sections type, default:
trending
. - batchSize {Number} indicates how many posts should the scraper have in the buffer at one time, default: 10.
- limit {Number} total count of results, default: -1.
- section {String} sections type, default:
-
returns asynchronous iterator of post objects.
post
object example:
Examples
Get first 1k posts using Promises and forEach
const scraper = ;scraper;
Get comments from the first 5 posts in section "hot" using Async/Await and for loop
const scraper = async { const feed = await scraper; for { for { console; } }};