Pull description information from meta tags
Tries to extract a description from the page by looking at meta and og description tags
This commit is contained in:
parent
40f8a4ddc4
commit
81d49c8e69
|
@ -63,7 +63,8 @@ function parse(msg, url, res, client) {
|
|||
var $ = cheerio.load(res.res.text);
|
||||
toggle.type = "link";
|
||||
toggle.head = $("title").text();
|
||||
toggle.body = "No description found.";
|
||||
toggle.body = $('meta[name=description]').attr('content') ||
|
||||
$('meta[property="og:description"]').attr('content') || "";
|
||||
break;
|
||||
|
||||
case "image/png":
|
||||
|
|
Loading…
Reference in New Issue