Same fix as last commit
This commit is contained in:
parent
1ec59bce2e
commit
b0547ce810
@ -97,8 +97,9 @@ def twitfix(sub_path):
|
|||||||
clean = twitter_url[:-4]
|
clean = twitter_url[:-4]
|
||||||
else:
|
else:
|
||||||
clean = twitter_url
|
clean = twitter_url
|
||||||
|
# TODO: Cache this, but not for too long as disk space can fill up
|
||||||
return redirect(direct_video_link(clean),302)
|
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"):
|
# elif request.url.endswith(".json") or request.url.endswith("%2Ejson"):
|
||||||
# twitter_url = "https://twitter.com/" + sub_path
|
# twitter_url = "https://twitter.com/" + sub_path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user