Removing the d. subdomain (Redundant)

Signed-off-by: Chloe Carver-Brown <admin@twxtter.com>
This commit is contained in:
Chloe Carver-Brown 2022-05-26 23:59:49 +01:00
parent 9b9cc2504f
commit a72edf04ea
No known key found for this signature in database
GPG Key ID: 71938715093BE620
1 changed files with 1 additions and 16 deletions

View File

@ -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: