aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2012-10-01 18:38:19 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2012-10-01 18:38:19 +0200
commitfcbc8c830e078bd43f90bdc08721229a452b4824 (patch)
tree086fcf61497471313d51a0082b1594947fbe6095
parentf48ce130c7ebacdf796e3f85282c7fdd0bd2bd1b (diff)
parent13e69f546c26bf35688929d36450b26da6b8d9ee (diff)
Merge branch 'master' of github.com:rg3/youtube-dl
-rwxr-xr-xyoutube-dlbin42454 -> 42818 bytes
-rwxr-xr-xyoutube-dl.exebin3992985 -> 3993053 bytes
-rw-r--r--youtube_dl/InfoExtractors.py8
3 files changed, 5 insertions, 3 deletions
diff --git a/youtube-dl b/youtube-dl
index fd5e09c3b..1055d246d 100755
--- a/youtube-dl
+++ b/youtube-dl
Binary files differ
diff --git a/youtube-dl.exe b/youtube-dl.exe
index bf7ba04d0..2b82e43f2 100755
--- a/youtube-dl.exe
+++ b/youtube-dl.exe
Binary files differ
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index bdb2ec311..8d428b25d 100644
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -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'
@@ -663,9 +663,11 @@ class DailymotionIE(InfoExtractor):
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