Update general.ts

This commit is contained in:
Acid Chicken (硫酸鶏) 2018-08-09 16:29:28 +09:00 committed by GitHub
parent b994fd39d9
commit 52b26abfbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,6 +49,9 @@ export default async (url: URL.Url): Promise<Summary> => {
image = image ? URL.resolve(url.href, image) : null;
const player =
$('meta[property="twitter:player"]').attr('content');
let description =
$('meta[property="og:description"]').attr('content') ||
$('meta[property="twitter:description"]').attr('content') ||
@ -118,6 +121,7 @@ export default async (url: URL.Url): Promise<Summary> => {
icon: icon || null,
description: description || null,
thumbnail: image || null,
player: player || null,
sitename: siteName || null
};
};