Merge pull request #1256 from thelounge/xPaw/og-title
Check og:title before title tag
This commit is contained in:
commit
5abc4c8c2a
@ -53,7 +53,10 @@ function parse(msg, url, res, client) {
|
|||||||
case "text/html":
|
case "text/html":
|
||||||
var $ = cheerio.load(res.text);
|
var $ = cheerio.load(res.text);
|
||||||
toggle.type = "link";
|
toggle.type = "link";
|
||||||
toggle.head = $("title").text();
|
toggle.head =
|
||||||
|
$("meta[property=\"og:title\"]").attr("content")
|
||||||
|
|| $("title").text()
|
||||||
|
|| "No title found.";
|
||||||
toggle.body =
|
toggle.body =
|
||||||
$("meta[property=\"og:description\"]").attr("content")
|
$("meta[property=\"og:description\"]").attr("content")
|
||||||
|| $("meta[name=\"description\"]").attr("content")
|
|| $("meta[name=\"description\"]").attr("content")
|
||||||
|
Loading…
Reference in New Issue
Block a user