Update regex to be more concise, add test for m.youtube.

This commit is contained in:
BlipRanger
2021-04-02 11:51:00 -04:00
committed by Ali Parlakci
parent a49d87e154
commit c9c864b71b
2 changed files with 2 additions and 3 deletions

View File

@@ -40,9 +40,7 @@ class DownloadFactory:
return SelfPost
elif re.match(url_beginning + r'v\.redd\.it', url):
return VReddit
elif re.match(url_beginning + r'youtu\.?be', url):
return Youtube
elif re.match(url_beginning + r'm.youtu\.?be', url):
elif re.match(url_beginning + r'(m\.)?youtu\.?be', url):
return Youtube
elif re.match(url_beginning + r'i\.redd\.it.*', url):
return Direct