From b0547ce8107979bac0b32946490f1a4e578cb8fb Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 17 Jul 2022 14:00:19 +0100 Subject: [PATCH] Same fix as last commit --- twitfix.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/twitfix.py b/twitfix.py index 74b7b3c..1341cbb 100644 --- a/twitfix.py +++ b/twitfix.py @@ -97,8 +97,9 @@ def twitfix(sub_path): clean = twitter_url[:-4] else: clean = twitter_url - - return redirect(direct_video_link(clean),302) + # TODO: Cache this, but not for too long as disk space can fill up + vid = requests.get(direct_video_link(twitter_url)) + return Response(vid.content,mimetype="video/mp4") # elif request.url.endswith(".json") or request.url.endswith("%2Ejson"): # twitter_url = "https://twitter.com/" + sub_path