add high res thumbnail

This commit is contained in:
2021-05-25 09:54:54 +02:00
parent d418b429aa
commit dc164fd377
2 changed files with 10 additions and 1 deletions

View File

@ -381,6 +381,8 @@ class MainHandler(tornado.web.RequestHandler):
meta = await handler.meta()
image = meta.get("og:image")
if isinstance(image, str):
if handler.provider == "youtube":
image = image.removesuffix("hqdefault.jpg") + "maxresdefault.jpg"
url = await handler.proxy.proxy_url(image, None)
if isinstance(url, str):
self.redirect(url, status=303)