From 6add65d37bdddcb1227bfd1435569cfe8e5b029a Mon Sep 17 00:00:00 2001 From: Dylan Date: Mon, 19 Sep 2022 01:35:02 +0100 Subject: [PATCH] Small code cleanup --- twitfix.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/twitfix.py b/twitfix.py index 6ae076c..523ab0c 100644 --- a/twitfix.py +++ b/twitfix.py @@ -55,7 +55,6 @@ def oembedend(): def twitfix(sub_path): user_agent = request.headers.get('user-agent') match = pathregex.search(sub_path) - print(request.url) if request.url.startswith("https://d.vx"): # Matches d.fx? Try to give the user a direct link if match.start() == 0: @@ -63,7 +62,7 @@ def twitfix(sub_path): if user_agent in generate_embed_user_agents: print( " ➤ [ D ] d.vx link shown to discord user-agent!") if request.url.endswith(".mp4") and "?" not in request.url: - # TODO: Cache this, but not for too long as disk space can fill up + if "?" not in request.url: clean = twitter_url[:-4] else: