mirror of
https://github.com/thelounge/thelounge
synced 2024-11-11 07:04:18 +00:00
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
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue