This commit is contained in:
Michael Lazar
2016-07-26 01:20:27 -07:00
parent 620434eed0
commit 349ea94afd
3 changed files with 4 additions and 4 deletions

View File

@@ -64,8 +64,8 @@ class YoutubeMIMEParser(BaseMIMEParser):
Assign a custom mime-type so they can be referenced in mailcap.
"""
pattern = re.compile(
r'(?:https?://)?(m\.)?(?:youtu\.be/|(?:www\.)?youtube\.com/watch'
r'(?:\.php)?\'?.*v=)([a-zA-Z0-9\-_]+)')
r'(?:https?://)?(m\.)?(?:youtu\.be/|(?:www\.)?youtube\.com/watch'
r'(?:\.php)?\'?.*v=)([a-zA-Z0-9\-_]+)')
@staticmethod
def get_mimetype(url):