add author

This commit is contained in:
Roy Olav Purser 2021-05-14 11:46:48 +02:00
parent e20b388a69
commit b74791aafa
Signed by: roypur
GPG Key ID: E14D26A036F21656
2 changed files with 3 additions and 2 deletions

View File

@ -2,9 +2,9 @@
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:title" content="{{ data["og:title"] }}" /> <meta property="og:title" content="{{ data["og:title"] }}" />
<meta property="og:description" content="{{ data["og:title"] }}" /> <meta property="og:description" content="{{ data["og:description"] }}" />
<meta property="og:type" content="video.other" /> <meta property="og:type" content="video.other" />
<meta property="og:image" content="https://i.ytimg.com/vi/3OJY5d96Ri8/hqdefault.jpg" /> <meta property="og:image" content="{{ data["og:image"] }}" />
<meta property="og:image:height" content="{{ data["og:image:height"] }}" /> <meta property="og:image:height" content="{{ data["og:image:height"] }}" />
<meta property="og:image:width" content="{{ data["og:image:width"] }}" /> <meta property="og:image:width" content="{{ data["og:image:width"] }}" />
<meta property="og:url" content="{% raw data["render_url"] %}" /> <meta property="og:url" content="{% raw data["render_url"] %}" />

View File

@ -240,6 +240,7 @@ class MainHandler(tornado.web.RequestHandler):
data = {} data = {}
if meta is not None: if meta is not None:
data["og:title"] = meta.get("title", "") data["og:title"] = meta.get("title", "")
data["og:description"] = meta.get("author_name", "")
data["og:image"] = meta.get("thumbnail_url", "") data["og:image"] = meta.get("thumbnail_url", "")
data["og:video:height"] = meta.get("height", "180") data["og:video:height"] = meta.get("height", "180")
data["og:video:width"] = meta.get("width", "320") data["og:video:width"] = meta.get("width", "320")