Attempt to fix #107 (Cannot replicate locally)
This commit is contained in:
@ -61,8 +61,11 @@ def oembedend():
|
||||
|
||||
@app.route('/<path:sub_path>') # Default endpoint used by everything
|
||||
def twitfix(sub_path):
|
||||
|
||||
user_agent = request.headers.get('user-agent')
|
||||
match = pathregex.search(sub_path)
|
||||
if match is not None:
|
||||
sub_path = match.group(0)
|
||||
|
||||
if request.url.endswith(".mp4") or request.url.endswith("%2Emp4"):
|
||||
twitter_url = "https://twitter.com/" + sub_path
|
||||
|
Reference in New Issue
Block a user