From 9d9c32b79728aece09fd1fa44625f23ee2b8cb92 Mon Sep 17 00:00:00 2001 From: Dylan Date: Fri, 5 May 2023 13:46:42 +0100 Subject: [PATCH] Fix text trimming w/ old limits --- twitfix.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/twitfix.py b/twitfix.py index b592fff..f5acdf3 100644 --- a/twitfix.py +++ b/twitfix.py @@ -453,7 +453,7 @@ def embed(video_link, vnf, image): image = embedVNF['images'][image] template = 'image.html' elif qrt['type'] == "Video" or qrt['type'] == "": - urlDesc = urllib.parse.quote(textwrap.shorten(desc, width=220, placeholder="...")) + urlDesc = urllib.parse.quote(desc) template = 'video.html' if vnf['type'] == "Image": @@ -466,11 +466,11 @@ def embed(video_link, vnf, image): if vnf['isGif'] == True and config['config']['gifConvertAPI'] != "" and config['config']['gifConvertAPI'] != "none": vnf['url'] = f"{config['config']['gifConvertAPI']}/convert.mp4?url={vnf['url']}" appNamePost = " - GIF" - urlDesc = urllib.parse.quote(textwrap.shorten(desc, width=220, placeholder="...")) + urlDesc = urllib.parse.quote(desc) template = 'video.html' if vnf['type'] == "": - urlDesc = urllib.parse.quote(textwrap.shorten(desc, width=220, placeholder="...")) + urlDesc = urllib.parse.quote(desc) template = 'video.html' color = "#7FFFD4" # Green