From 685f642c45d0cf10b1de87da66242911f6d8fa97 Mon Sep 17 00:00:00 2001 From: dylanpdx Date: Fri, 16 Dec 2022 21:41:36 +0000 Subject: [PATCH] WIP: Changing URL for embeds to user's URL --- templates/index.html | 2 +- templates/text.html | 2 +- templates/video.html | 2 +- twitfix.py | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/templates/index.html b/templates/index.html index 9630f82..72cd553 100644 --- a/templates/index.html +++ b/templates/index.html @@ -26,5 +26,5 @@ - + {% 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 85b5b78..3bd7626 100644 --- a/templates/text.html +++ b/templates/text.html @@ -30,5 +30,5 @@ - + {% 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 3436a52..d3fd3b3 100644 --- a/templates/video.html +++ b/templates/video.html @@ -21,5 +21,5 @@ - + {% 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 4d81867..71eaa98 100644 --- a/twitfix.py +++ b/twitfix.py @@ -395,6 +395,7 @@ def getTemplate(template,vnf,desc,image,video_link,color,urlDesc,urlUser,urlLink time = vnf['time'], screenName = vnf['screen_name'], vidlink = embedVNF['url'], + userLink = f"https://twitter.com/{vnf['screen_name']}", pfp = vnf['pfp'], vidurl = embedVNF['url'], desc = desc, @@ -408,6 +409,7 @@ def getTemplate(template,vnf,desc,image,video_link,color,urlDesc,urlUser,urlLink urlDesc = urlDesc, urlUser = urlUser, urlLink = urlLink, + urlUserLink= urllib.parse.quote(f"https://twitter.com/{vnf['screen_name']}"), tweetLink = vnf['tweet'], videoSize = embedVNF['size'] )