From a72edf04ea3dd8022c655d06d484df649d21d4f6 Mon Sep 17 00:00:00 2001 From: Chloe Carver-Brown Date: Thu, 26 May 2022 23:59:49 +0100 Subject: [PATCH] Removing the d. subdomain (Redundant) Signed-off-by: Chloe Carver-Brown --- twitfix.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/twitfix.py b/twitfix.py index 1e9190d..c230b7c 100644 --- a/twitfix.py +++ b/twitfix.py @@ -286,22 +286,7 @@ def twitfix(sub_path): match = pathregex.search(sub_path) print(request.url) - if request.url.startswith( - "https://d.twx" - ): # Matches d.fx? Try to give the user a direct link - if user_agent in generate_embed_user_agents: - print(" ➤ [ D ] d.twx link shown to discord user-agent!") - if request.url.endswith(".mp4") and "?" not in request.url: - return dl(sub_path) - else: - return message( - "To use a direct MP4 link in discord, remove anything past '?' and put '.mp4' at the end" - ) - else: - print(" ➤ [ R ] Redirect to MP4 using d.twxtter.com") - return dir(sub_path) - - elif request.url.endswith(".mp4") or request.url.endswith("%2Emp4"): + if request.url.endswith(".mp4") or request.url.endswith("%2Emp4"): twitter_url = "https://twitter.com/" + sub_path if "?" not in request.url: