hack to exclude internal links from the list
This commit is contained in:
@ -123,7 +123,7 @@ exports.getScraping = function(req, res, next) {
|
|||||||
if (err) return next(err);
|
if (err) return next(err);
|
||||||
var $ = cheerio.load(body);
|
var $ = cheerio.load(body);
|
||||||
var links = [];
|
var links = [];
|
||||||
$('.title a').each(function() {
|
$(".title a[href^='http'], a[href^='https']").each(function() {
|
||||||
links.push($(this));
|
links.push($(this));
|
||||||
});
|
});
|
||||||
res.render('api/scraping', {
|
res.render('api/scraping', {
|
||||||
|
Reference in New Issue
Block a user