mirror of
https://github.com/anxdpanic/plugin.video.youtube.git
synced 2026-04-28 00:00:57 -07:00
Tweak regexes
Allows support for mobile web urls video_id regex pattern simplified
This commit is contained in:
parent
f9478233b0
commit
8967f4f3d3
2 changed files with 3 additions and 3 deletions
|
|
@ -414,7 +414,7 @@ def get_live(channel_id=None, user=None, url=None, addon_id=None):
|
|||
matched_type = 'user'
|
||||
|
||||
elif url:
|
||||
patterns = [r'^(?:http)*s*:*[/]{0,2}(?:www\.)*youtu(?:\.be|be\.com)/'
|
||||
patterns = [r'^(?:http)*s*:*[/]{0,2}(?:w{3}\.|m\.)*youtu(?:\.be|be\.com)/'
|
||||
r'(?P<type>channel|user)/(?P<channel_id>[^/]+)(?:/live)*$']
|
||||
|
||||
for pattern in patterns:
|
||||
|
|
|
|||
|
|
@ -111,8 +111,8 @@ def resolve(video_id, sort=True, addon_id=None):
|
|||
matched_id = None
|
||||
streams = None
|
||||
|
||||
patterns = [r'(?P<video_id>[a-zA-Z0-9_\-]{11})',
|
||||
r'(?:http)*s*:*[/]{0,2}(?:www\.)*youtu(?:\.be/|be\.com/'
|
||||
patterns = [r'(?P<video_id>[\w-]{11})',
|
||||
r'(?:http)*s*:*[/]{0,2}(?:w{3}\.|m\.)*youtu(?:\.be/|be\.com/'
|
||||
r'(?:embed/|watch/|v/|.*?[?&/]v=))(?P<video_id>[a-zA-Z0-9_\-]{11}).*']
|
||||
|
||||
for pattern in patterns:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue