Fixed hacker news api web scraping example

This commit is contained in:
Sahat Yalkabov
2014-01-03 05:12:00 -05:00
parent 5261bfef5f
commit 85320d216b

View File

@ -123,8 +123,8 @@ exports.getScraping = function(req, res, next) {
if (err) return next(err);
var $ = cheerio.load(body);
var links = [];
$('.title').find('a').slice(0,30).each(function(i, elem) {
links.push($(elem));
$('.title a').each(function() {
links.push($(this));
});
res.render('api/scraping', {
title: 'Web Scraping',