From 56f42744b99a304df092671c4571993f0b577b69 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 12 Aug 2023 14:03:08 +0100 Subject: [PATCH] Fix #128 (some tweet text being cut off) --- twitfix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twitfix.py b/twitfix.py index ee1bd9e..49c2eb2 100644 --- a/twitfix.py +++ b/twitfix.py @@ -602,7 +602,7 @@ def getTemplate(template,vnf,desc,image,video_link,color,urlDesc,urlUser,urlLink def embed(video_link, vnf, image): log.info("Embedding " + vnf['type'] + ": " + video_link) - desc = re.sub(r' http.*t\.co\S+', '', vnf['description']) + desc = re.sub(r' https:\/\/t\.co\/\S+(?=\s|$)', '', vnf['description']) urlUser = urllib.parse.quote(vnf['uploader']) urlDesc = urllib.parse.quote(desc) urlLink = urllib.parse.quote(video_link)