From 96246aa9217774ddc88275ffba5bf1790317eda9 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 15 May 2022 01:47:20 +0100 Subject: [PATCH] Squashed commit of the following: commit fba1256efd3ce539f716e2f23b45c122c8422759 Author: Dylan Date: Sun May 15 01:42:22 2022 +0100 Fixed infinite redirect(?) commit 85c682ab111f575c8c517117f456cf354e9f5bf7 Author: Dylan Date: Sun May 15 01:15:15 2022 +0100 Updated gitignore --- templates/image.html | 27 +++++++++------------- templates/index.html | 55 +++++++++++++++++++------------------------- templates/text.html | 27 +++++++++------------- templates/video.html | 49 +++++++++++++++++---------------------- twitfix.py | 3 ++- 5 files changed, 69 insertions(+), 92 deletions(-) diff --git a/templates/image.html b/templates/image.html index 7846217..43329c4 100644 --- a/templates/image.html +++ b/templates/image.html @@ -14,22 +14,17 @@ {{ pfp }} - URL of the posters PFP --> {% block head %} - - - + + + - - - - - + + + + + - - - - -{% endblock %} + -{% block body %} -Redirecting you to the tweet in a moment. Or click here. -{% endblock %} + + {% endblock %} {% block body %} Redirecting you to the tweet in a moment. Or click here. {% endblock %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 348f208..9630f82 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,37 +1,30 @@ -{% extends 'base.html' %} +{% extends 'base.html' %} {% block head %} + + + -{% block head %} - - - - - - - - - - - - + + + + - - - - - - - - - - - - - -{% endblock %} + + + + + + + + + -{% block body %} -Redirecting you to the tweet in a moment. Or click here. -{% endblock %} + + + {% endblock %} {% block body %} Redirecting you to the tweet in a moment. Or click here. {% endblock %} \ No newline at end of file diff --git a/templates/text.html b/templates/text.html index 95ea95d..7ba9511 100644 --- a/templates/text.html +++ b/templates/text.html @@ -18,22 +18,17 @@ {{ time }} - Time Created --> {% block head %} - - - - + + + + - - - - + + + + - - - - -{% endblock %} + -{% block body %} -Redirecting you to the tweet in a moment. Or click here. -{% endblock %} + + {% endblock %} {% block body %} Redirecting you to the tweet in a moment. Or click here. {% endblock %} \ No newline at end of file diff --git a/templates/video.html b/templates/video.html index f2c81a7..b99e0f3 100644 --- a/templates/video.html +++ b/templates/video.html @@ -1,31 +1,24 @@ -{% extends 'base.html' %} +{% extends 'base.html' %} {% block head %} + + + -{% block head %} - - - + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + - - -{% endblock %} - -{% block body %} -Redirecting you to the tweet in a moment. Or click here. -{% endblock %} + + {% endblock %} {% block body %} Redirecting you to the tweet in a moment. Or click here. {% endblock %} \ No newline at end of file diff --git a/twitfix.py b/twitfix.py index 9d273d0..a104f3e 100644 --- a/twitfix.py +++ b/twitfix.py @@ -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: