Try adding extra meta tags
This commit is contained in:
parent
44348773e2
commit
e9bbe61eba
10
app.py
10
app.py
|
@ -68,9 +68,13 @@ def proxy(video_id):
|
||||||
if tag.get("property") == "og:image" and thumbnail_url:
|
if tag.get("property") == "og:image" and thumbnail_url:
|
||||||
tag["content"] = thumbnail_url
|
tag["content"] = thumbnail_url
|
||||||
break
|
break
|
||||||
# Fix embed (Niconico doesn't return MP4s)
|
|
||||||
# if tag.get("property") == "og:video:type":
|
og_tags.remove(soup.find("meta", property="og:video:type"))
|
||||||
# tag["content"] = "text/html"
|
og_tags.append(soup.new_tag("meta", property="og:video:type", content="text/html"))
|
||||||
|
og_tags.append(soup.new_tag("meta", property="twitter:card", content="player"))
|
||||||
|
og_tags.append(soup.new_tag("meta", property="twitter:image", content="0"))
|
||||||
|
og_tags.append(soup.new_tag("meta", property="twitter:player:stream:content_type", content="text/html"))
|
||||||
|
og_tags.append(soup.new_tag("meta", property="theme-color", content="#f7f7f7"))
|
||||||
|
|
||||||
og_tags_str = "\n".join(str(tag) for tag in og_tags)
|
og_tags_str = "\n".join(str(tag) for tag in og_tags)
|
||||||
html_response = f"""
|
html_response = f"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user