Fixed infinite redirect(?)
This commit is contained in:
parent
85c682ab11
commit
fba1256efd
5 changed files with 69 additions and 92 deletions
|
@ -14,22 +14,17 @@
|
|||
{{ pfp }} - URL of the posters PFP
|
||||
-->
|
||||
{% block head %}
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
||||
<meta content="{{ color }}" name="theme-color" />
|
||||
<meta property="og:site_name" content="{{ appname }}"/>
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
||||
<meta content="{{ color }}" name="theme-color" />
|
||||
<meta property="og:site_name" content="{{ appname }}" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content="{{ user }} (@{{ screenName }})" />
|
||||
<meta name="twitter:image" content="{{ pic }}" />
|
||||
<meta name="twitter:image" content="{{ pic }}" />
|
||||
<meta name="twitter:creator" content="@{{ user }}" />
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content="{{ user }} (@{{ screenName }})" />
|
||||
<meta name="twitter:image" content="{{ pic }}" />
|
||||
<meta name="twitter:image" content="{{ pic }}" />
|
||||
<meta name="twitter:creator" content="@{{ user }}" />
|
||||
|
||||
<meta property="og:description" content="{{ desc }}" />
|
||||
|
||||
<!--<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user=Twitter&link={{ urlLink }}&ttype=photo" type="application/json+oembed" title="{{ user }}">-->
|
||||
<meta http-equiv = "refresh" content = "0; url = {{ vidlink }}" />
|
||||
{% endblock %}
|
||||
<meta property="og:description" content="{{ desc }}" />
|
||||
|
||||
{% block body %}
|
||||
Redirecting you to the tweet in a moment. <a href="{{ vidlink }}">Or click here.</a>
|
||||
{% endblock %}
|
||||
<!--<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user=Twitter&link={{ urlLink }}&ttype=photo" type="application/json+oembed" title="{{ user }}">-->
|
||||
<meta http-equiv="refresh" content="0; url = {{ tweetLink }}" /> {% endblock %} {% block body %} Redirecting you to the tweet in a moment. <a href="{{ tweetLink }}">Or click here.</a> {% endblock %}
|
|
@ -1,37 +1,30 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends 'base.html' %} {% block head %}
|
||||
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
|
||||
<meta content="{{ color }}" name="theme-color" />
|
||||
<meta property="og:site_name" content="{{ appname }}">
|
||||
|
||||
{% block head %}
|
||||
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
|
||||
<meta content="{{ color }}" name="theme-color" />
|
||||
<meta property="og:site_name" content="{{ appname }}">
|
||||
|
||||
<meta name="twitter:card" content="player" />
|
||||
<meta name="twitter:title" content="{{ user }}" />
|
||||
<meta name="twitter:image" content="{{ pic }}" />
|
||||
<!-- The line below breaks Telegram embeds if present but doesn't affect Discord embeds if removed
|
||||
<meta name="twitter:card" content="player" />
|
||||
<meta name="twitter:title" content="{{ user }}" />
|
||||
<meta name="twitter:image" content="{{ pic }}" />
|
||||
<!-- The line below breaks Telegram embeds if present but doesn't affect Discord embeds if removed
|
||||
<meta name="twitter:player" content="{{ vidurl }}" />
|
||||
<meta name="twitter:description" content="{{ desc }}" />!-->
|
||||
<meta name="twitter:player:width" content="720" />
|
||||
<meta name="twitter:player:height" content="480" />
|
||||
<meta name="twitter:player:stream" content="{{ vidurl }}" />
|
||||
<meta name="twitter:player:stream:content_type" content="video/mp4" />
|
||||
<meta name="twitter:player:width" content="720" />
|
||||
<meta name="twitter:player:height" content="480" />
|
||||
<meta name="twitter:player:stream" content="{{ vidurl }}" />
|
||||
<meta name="twitter:player:stream:content_type" content="video/mp4" />
|
||||
|
||||
|
||||
<meta property="og:url" content="{{ vidlink }}" />
|
||||
<meta property="og:video" content="{{ vidurl }}" />
|
||||
<meta property="og:video:secure_url" content="{{ vidurl }}" />
|
||||
<meta property="og:video:type" content="video/mp4" />
|
||||
<meta property="og:video:width" content="720" />
|
||||
<meta property="og:video:height" content="480" />
|
||||
<meta property="og:title" content="{{ user }}" />
|
||||
<!--<meta property="og:description" content="{{ desc }}" />!-->
|
||||
<meta property="og:image" content="{{ pic }}" />
|
||||
|
||||
<!--!-->
|
||||
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user={{ urlDesc }}&link={{ urlLink }}" type="application/json+oembed" title="{{ user }}">
|
||||
<meta http-equiv = "refresh" content = "0; url = {{ vidlink }}" />
|
||||
{% endblock %}
|
||||
<meta property="og:url" content="{{ vidlink }}" />
|
||||
<meta property="og:video" content="{{ vidurl }}" />
|
||||
<meta property="og:video:secure_url" content="{{ vidurl }}" />
|
||||
<meta property="og:video:type" content="video/mp4" />
|
||||
<meta property="og:video:width" content="720" />
|
||||
<meta property="og:video:height" content="480" />
|
||||
<meta property="og:title" content="{{ user }}" />
|
||||
<!--<meta property="og:description" content="{{ desc }}" />!-->
|
||||
<meta property="og:image" content="{{ pic }}" />
|
||||
|
||||
{% block body %}
|
||||
Redirecting you to the tweet in a moment. <a href="{{ vidlink }}">Or click here.</a>
|
||||
{% endblock %}
|
||||
<!--!-->
|
||||
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user={{ urlDesc }}&link={{ urlLink }}" type="application/json+oembed" title="{{ user }}">
|
||||
<meta http-equiv="refresh" content="0; url = {{ tweetLink }}" /> {% endblock %} {% block body %} Redirecting you to the tweet in a moment. <a href="{{ tweetLink }}">Or click here.</a> {% endblock %}
|
|
@ -18,22 +18,17 @@
|
|||
{{ time }} - Time Created
|
||||
-->
|
||||
{% block head %}
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
||||
<meta content="{{ color }}" name="theme-color" />
|
||||
<meta property="og:site_name" content="{{ appname }}"/>
|
||||
<meta property="og:image" content="{{ pfp }}" />
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
||||
<meta content="{{ color }}" name="theme-color" />
|
||||
<meta property="og:site_name" content="{{ appname }}" />
|
||||
<meta property="og:image" content="{{ pfp }}" />
|
||||
|
||||
<meta name="twitter:card" content="tweet" />
|
||||
<meta name="twitter:title" content="{{ user }} (@{{ screenName }})" />
|
||||
<meta name="twitter:image" content="{{ pic }}" />
|
||||
<meta name="twitter:creator" content="@{{ user }}" />
|
||||
<meta name="twitter:card" content="tweet" />
|
||||
<meta name="twitter:title" content="{{ user }} (@{{ screenName }})" />
|
||||
<meta name="twitter:image" content="{{ pic }}" />
|
||||
<meta name="twitter:creator" content="@{{ user }}" />
|
||||
|
||||
<meta property="og:description" content="{{ desc }}" />
|
||||
|
||||
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user=Twitter&link={{ urlLink }}&ttype=link" type="application/json+oembed" title="{{ user }}">
|
||||
<meta http-equiv = "refresh" content = "0; url = {{ vidlink }}" />
|
||||
{% endblock %}
|
||||
<meta property="og:description" content="{{ desc }}" />
|
||||
|
||||
{% block body %}
|
||||
Redirecting you to the tweet in a moment. <a href="{{ vidlink }}">Or click here.</a>
|
||||
{% endblock %}
|
||||
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user=Twitter&link={{ urlLink }}&ttype=link" type="application/json+oembed" title="{{ user }}">
|
||||
<meta http-equiv="refresh" content="0; url = {{ tweetLink }}" /> {% endblock %} {% block body %} Redirecting you to the tweet in a moment. <a href="{{ tweetLink }}">Or click here.</a> {% endblock %}
|
|
@ -1,31 +1,24 @@
|
|||
{% extends 'base.html' %}
|
||||
{% extends 'base.html' %} {% block head %}
|
||||
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
|
||||
<meta content="{{ color }}" name="theme-color" />
|
||||
<meta property="og:site_name" content="{{ appname }}">
|
||||
|
||||
{% block head %}
|
||||
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
|
||||
<meta content="{{ color }}" name="theme-color" />
|
||||
<meta property="og:site_name" content="{{ appname }}">
|
||||
<meta name="twitter:card" content="player" />
|
||||
<meta name="twitter:title" content="{{ user }} (@{{ screenName }})" />
|
||||
<meta name="twitter:image" content="{{ pic }}" />
|
||||
<meta name="twitter:player:width" content="720" />
|
||||
<meta name="twitter:player:height" content="480" />
|
||||
<meta name="twitter:player:stream" content="{{ vidurl }}" />
|
||||
<meta name="twitter:player:stream:content_type" content="video/mp4" />
|
||||
|
||||
<meta name="twitter:card" content="player" />
|
||||
<meta name="twitter:title" content="{{ user }} (@{{ screenName }})" />
|
||||
<meta name="twitter:image" content="{{ pic }}" />
|
||||
<meta name="twitter:player:width" content="720" />
|
||||
<meta name="twitter:player:height" content="480" />
|
||||
<meta name="twitter:player:stream" content="{{ vidurl }}" />
|
||||
<meta name="twitter:player:stream:content_type" content="video/mp4" />
|
||||
|
||||
<meta property="og:url" content="{{ vidlink }}" />
|
||||
<meta property="og:video" content="{{ vidurl }}" />
|
||||
<meta property="og:video:secure_url" content="{{ vidurl }}" />
|
||||
<meta property="og:video:type" content="video/mp4" />
|
||||
<meta property="og:video:width" content="720" />
|
||||
<meta property="og:video:height" content="480" />
|
||||
<meta name="twitter:title" content="{{ user }} (@{{ screenName }})" />
|
||||
<meta property="og:image" content="{{ pic }}" />
|
||||
<meta property="og:url" content="{{ vidlink }}" />
|
||||
<meta property="og:video" content="{{ vidurl }}" />
|
||||
<meta property="og:video:secure_url" content="{{ vidurl }}" />
|
||||
<meta property="og:video:type" content="video/mp4" />
|
||||
<meta property="og:video:width" content="720" />
|
||||
<meta property="og:video:height" content="480" />
|
||||
<meta name="twitter:title" content="{{ user }} (@{{ screenName }})" />
|
||||
<meta property="og:image" content="{{ pic }}" />
|
||||
|
||||
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user={{ urlDesc }}&link={{ urlLink }}&ttype=video" type="application/json+oembed" title="{{ user }}">
|
||||
<meta http-equiv = "refresh" content = "0; url = {{ vidlink }}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
Redirecting you to the tweet in a moment. <a href="{{ vidlink }}">Or click here.</a>
|
||||
{% endblock %}
|
||||
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user={{ urlDesc }}&link={{ urlLink }}&ttype=video" type="application/json+oembed" title="{{ user }}">
|
||||
<meta http-equiv="refresh" content="0; url = {{ tweetLink }}" /> {% endblock %} {% block body %} Redirecting you to the tweet in a moment. <a href="{{ tweetLink }}">Or click here.</a> {% endblock %}
|
|
@ -465,7 +465,8 @@ def embed(video_link, vnf, image):
|
|||
url = config['config']['url'],
|
||||
urlDesc = urlDesc,
|
||||
urlUser = urlUser,
|
||||
urlLink = urlLink )
|
||||
urlLink = urlLink,
|
||||
tweetLink = vnf['tweet'] )
|
||||
|
||||
def tweetType(tweet): # Are we dealing with a Video, Image, or Text tweet?
|
||||
if 'extended_entities' in tweet:
|
||||
|
|
Loading…
Reference in a new issue