Try to fix site name again

This commit is contained in:
MMaker 2025-02-25 18:10:12 -05:00
parent b3539d7a47
commit 8ebacc84b0
Signed by: mmaker
GPG Key ID: CCE79B8FEDA40FB2

3
app.py

@ -300,7 +300,7 @@ def proxy(video_id):
if tag.get("property") == "og:video:height":
og_video_height = tag.get("content")
og_tags_str = "\n".join(str(tag) for tag in og_tags)
og_tags_str = "\n".join(str(tag) for tag in og_tags if tag.get("property") not in ["og:site_name"])
og_tags_str += '\n<meta content="0" property="twitter:image"/>'
og_tags_str += '\n<meta content="player" property="twitter:card"/>'
og_tags_str += '\n<meta content="video/mp4" property="twitter:player:stream:content_type"/>'
@ -309,6 +309,7 @@ def proxy(video_id):
og_tags_str += f'\n<meta content="{og_video_width}" property="twitter:player:width"/>'
if og_video_height:
og_tags_str += f'\n<meta content="{og_video_height}" property="twitter:player:height"/>'
og_tags_str += '\n<meta content="ニコニコ動画" property="og:site_name"/>'
og_tags_str += f'\n<link rel="alternate" href="{get_oembed_url(params)}" type="application/json+oembed" title="{video_id}"/>'
html_response = f"""<!DOCTYPE html>
<!--