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 = [
|
patterns = [
|
||||||
re.compile(pattern)
|
re.compile(pattern)
|
||||||
for pattern in [
|
for pattern in [
|
||||||
'https?://www.youtube.com/watch?v=([^&#]+)'
|
r'https?://www.youtube.com/watch?v=([^&#]+)'
|
||||||
'https?://youtube.com/watch?v=([^&#]+)'
|
r'https?://youtube.com/watch?v=([^&#]+)'
|
||||||
'https?://youtu.be/([^&#/]+)'
|
r'https?://youtu.be/([^&#/]+)'
|
||||||
'youtube:video:([^&#:])'
|
r'youtube:video:([^&#:])'
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
for pattern in patterns:
|
for pattern in patterns:
|
||||||
m = re.match(pattern, url)
|
m = pattern.match(url)
|
||||||
if m:
|
if m:
|
||||||
return m.group(1)
|
return m.group(1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue