forked from platypush/platypush
Regex format fix
This commit is contained in:
parent
03dc524f80
commit
93ac6c8af9
1 changed files with 5 additions and 5 deletions
|
@ -483,15 +483,15 @@ class MediaPlugin(Plugin):
|
|||
patterns = [
|
||||
re.compile(pattern)
|
||||
for pattern in [
|
||||
'https?://www.youtube.com/watch?v=([^&#]+)'
|
||||
'https?://youtube.com/watch?v=([^&#]+)'
|
||||
'https?://youtu.be/([^&#/]+)'
|
||||
'youtube:video:([^&#:])'
|
||||
r'https?://www.youtube.com/watch?v=([^&#]+)'
|
||||
r'https?://youtube.com/watch?v=([^&#]+)'
|
||||
r'https?://youtu.be/([^&#/]+)'
|
||||
r'youtube:video:([^&#:])'
|
||||
]
|
||||
]
|
||||
|
||||
for pattern in patterns:
|
||||
m = re.match(pattern, url)
|
||||
m = pattern.match(url)
|
||||
if m:
|
||||
return m.group(1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue