From 3d8423db96589c870657f1e9ba8c81de9f6788c6 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 2 Jul 2023 15:47:50 +0100 Subject: [PATCH] Attempt to fix redirect loop issue --- twitfix.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/twitfix.py b/twitfix.py index b2227d3..2e2c9fb 100644 --- a/twitfix.py +++ b/twitfix.py @@ -110,6 +110,8 @@ def twitfix(sub_path): if match.start() == 0: twitter_url = "https://twitter.com/" + sub_path + else: + twitter_url = "https://" + sub_path if isValidUserAgent(user_agent): res = embedCombined(twitter_url) @@ -539,8 +541,8 @@ def embedCombinedVnf(video_link,vnf): if qrt is not None: desc=msgs.formatEmbedDesc(vnf['type'],desc,qrt,pollDisplay,likeDisplay) - - image = "https://vxtwitter.com/rendercombined.jpg?imgs=" + host = config['config']['url'] + image = f"{host}/rendercombined.jpg?imgs=" for i in range(0,int(vnf['images'][4])): image = image + vnf['images'][i] + "," image = image[:-1] # Remove last comma