diff --git a/youtube-dl b/youtube-dl index fd5e09c3b7..1055d246d3 100755 Binary files a/youtube-dl and b/youtube-dl differ diff --git a/youtube-dl.exe b/youtube-dl.exe index bf7ba04d03..2b82e43f2f 100755 Binary files a/youtube-dl.exe and b/youtube-dl.exe differ diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index bdb2ec3110..8d428b25dc 100644 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -616,7 +616,7 @@ def _real_extract(self, url): 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 @@ def _real_extract(self, url): 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 @@ def _real_extract(self, url): 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