mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
Youku: match vid more precisely (underscores excluded)
This commit is contained in:
parent
153d8649ca
commit
a5a28c1d7a
@ -55,14 +55,14 @@ class Youku(VideoExtractor):
|
||||
def get_vid_from_url(url):
|
||||
"""Extracts video ID from URL.
|
||||
"""
|
||||
return match1(url, r'youku\.com/v_show/id_([\w=]+)') or \
|
||||
match1(url, r'player\.youku\.com/player\.php/sid/([\w=]+)/v\.swf') or \
|
||||
match1(url, r'loader\.swf\?VideoIDS=([\w=]+)')
|
||||
return match1(url, r'youku\.com/v_show/id_([a-zA-Z0-9=]+)') or \
|
||||
match1(url, r'player\.youku\.com/player\.php/sid/([a-zA-Z0-9=]+)/v\.swf') or \
|
||||
match1(url, r'loader\.swf\?VideoIDS=([a-zA-Z0-9=]+)')
|
||||
|
||||
def get_playlist_id_from_url(url):
|
||||
"""Extracts playlist ID from URL.
|
||||
"""
|
||||
return match1(url, r'youku\.com/playlist_show/id_([\w=]+)')
|
||||
return match1(url, r'youku\.com/playlist_show/id_([a-zA-Z0-9=]+)')
|
||||
|
||||
def download_playlist_by_url(self, url, **kwargs):
|
||||
self.url = url
|
||||
|
Loading…
Reference in New Issue
Block a user