Check og:title before title tag
This commit is contained in:
parent
f55d765aae
commit
015a9fb6ef
@ -49,7 +49,10 @@ function parse(msg, url, res, client) {
|
||||
case "text/html":
|
||||
var $ = cheerio.load(res.text);
|
||||
toggle.type = "link";
|
||||
toggle.head = $("title").text();
|
||||
toggle.head =
|
||||
$("meta[property=\"og:title\"]").attr("content")
|
||||
|| $("title").text()
|
||||
|| "No title found.";
|
||||
toggle.body =
|
||||
$("meta[name=description]").attr("content")
|
||||
|| $("meta[property=\"og:description\"]").attr("content")
|
||||
|
Loading…
Reference in New Issue
Block a user