fix infinite redirect

Signed-off-by: Chloe Carver-Brown <admin@twxtter.com>
This commit is contained in:
Chloe Carver-Brown 2022-05-26 20:15:50 +01:00
parent 1ae75c23e1
commit 3c78007607
No known key found for this signature in database
GPG Key ID: 71938715093BE620
3 changed files with 6 additions and 4 deletions

View File

@ -27,9 +27,9 @@
<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 }}" />
<meta http-equiv = "refresh" content = "0; url = {{ tweetLink }}" />
{% endblock %}
{% block body %}
Redirecting you to the tweet in a moment. <a href="{{ vidlink }}">Or click here.</a>
Redirecting you to the tweet in a moment. <a href="{{ tweetLink }}">Or click here.</a>
{% endblock %}

View File

@ -20,9 +20,9 @@
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="{{ pic }}" />
<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="{{ vidlink }}">Or click here.</a>
Redirecting you to the tweet in a moment. <a href="{{ tweetLink }}">Or click here.</a>
{% endblock %}

View File

@ -596,6 +596,7 @@ def link_to_vnf_from_api(video_link):
and video["bitrate"] > best_bitrate
):
url = video["url"]
best_bitrate = video['bitrate']
elif tweetType(tweet) == "Text":
url = ""
thumb = ""
@ -830,6 +831,7 @@ def embed(video_link, vnf, image, raw=False):
urlDesc=urlDesc,
urlUser=urlUser,
urlLink=urlLink,
tweetLink=vnf['tweet']
)