Fixed infinite redirect(?)

This commit is contained in:
Dylan 2022-05-15 01:42:22 +01:00
parent 85c682ab11
commit fba1256efd
5 changed files with 69 additions and 92 deletions

View file

@ -27,9 +27,4 @@
<meta property="og:description" content="{{ desc }}" /> <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 }}">--> <!--<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 }}" /> <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 %}
{% endblock %}
{% block body %}
Redirecting you to the tweet in a moment. <a href="{{ vidlink }}">Or click here.</a>
{% endblock %}

View file

@ -1,6 +1,4 @@
{% extends 'base.html' %} {% extends 'base.html' %} {% block head %}
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' /> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
<meta content="{{ color }}" name="theme-color" /> <meta content="{{ color }}" name="theme-color" />
<meta property="og:site_name" content="{{ appname }}"> <meta property="og:site_name" content="{{ appname }}">
@ -29,9 +27,4 @@
<!--!--> <!--!-->
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user={{ urlDesc }}&link={{ urlLink }}" type="application/json+oembed" title="{{ user }}"> <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 }}" /> <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 %}
{% endblock %}
{% block body %}
Redirecting you to the tweet in a moment. <a href="{{ vidlink }}">Or click here.</a>
{% endblock %}

View file

@ -31,9 +31,4 @@
<meta property="og:description" content="{{ desc }}" /> <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 }}"> <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 }}" /> <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 %}
{% endblock %}
{% block body %}
Redirecting you to the tweet in a moment. <a href="{{ vidlink }}">Or click here.</a>
{% endblock %}

View file

@ -1,6 +1,4 @@
{% extends 'base.html' %} {% extends 'base.html' %} {% block head %}
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' /> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
<meta content="{{ color }}" name="theme-color" /> <meta content="{{ color }}" name="theme-color" />
<meta property="og:site_name" content="{{ appname }}"> <meta property="og:site_name" content="{{ appname }}">
@ -23,9 +21,4 @@
<meta property="og:image" content="{{ pic }}" /> <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 }}"> <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 }}" /> <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 %}
{% endblock %}
{% block body %}
Redirecting you to the tweet in a moment. <a href="{{ vidlink }}">Or click here.</a>
{% endblock %}

View file

@ -465,7 +465,8 @@ def embed(video_link, vnf, image):
url = config['config']['url'], url = config['config']['url'],
urlDesc = urlDesc, urlDesc = urlDesc,
urlUser = urlUser, urlUser = urlUser,
urlLink = urlLink ) urlLink = urlLink,
tweetLink = vnf['tweet'] )
def tweetType(tweet): # Are we dealing with a Video, Image, or Text tweet? def tweetType(tweet): # Are we dealing with a Video, Image, or Text tweet?
if 'extended_entities' in tweet: if 'extended_entities' in tweet: