mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-27 14:15:37 +01:00
Merge branch 'master' of github.com:rg3/youtube-dl
This commit is contained in:
commit
fcbc8c830e
BIN
youtube-dl
BIN
youtube-dl
Binary file not shown.
BIN
youtube-dl.exe
BIN
youtube-dl.exe
Binary file not shown.
|
@ -616,7 +616,7 @@ class MetacafeIE(InfoExtractor):
|
|||
class DailymotionIE(InfoExtractor):
|
||||
"""Information Extractor for Dailymotion"""
|
||||
|
||||
_VALID_URL = r'(?i)(?:https?://)?(?:www\.)?dailymotion\.[a-z]{2,3}/video/([^_/]+)_([^/]+)'
|
||||
_VALID_URL = r'(?i)(?:https?://)?(?:www\.)?dailymotion\.[a-z]{2,3}/video/([^/]+)'
|
||||
IE_NAME = u'dailymotion'
|
||||
|
||||
def __init__(self, downloader=None):
|
||||
|
@ -637,7 +637,7 @@ class DailymotionIE(InfoExtractor):
|
|||
self._downloader.trouble(u'ERROR: invalid URL: %s' % url)
|
||||
return
|
||||
|
||||
video_id = mobj.group(1)
|
||||
video_id = mobj.group(1).split('_')[0].split('?')[0]
|
||||
|
||||
video_extension = 'mp4'
|
||||
|
||||
|
@ -662,10 +662,12 @@ class DailymotionIE(InfoExtractor):
|
|||
elif 'sdURL' in flashvars: max_quality = 'sdURL'
|
||||
else: max_quality = 'ldURL'
|
||||
mobj = re.search(r'"' + max_quality + r'":"(.+?)"', flashvars)
|
||||
if mobj is None:
|
||||
mobj = re.search(r'"video_url":"(.*?)",', flashvars)
|
||||
if mobj is None:
|
||||
self._downloader.trouble(u'ERROR: unable to extract media URL')
|
||||
return
|
||||
video_url = mobj.group(1).replace('\\/', '/')
|
||||
video_url = urllib.unquote(mobj.group(1)).replace('\\/', '/')
|
||||
|
||||
# TODO: support choosing qualities
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user