projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39ce6e7
)
DailymotionIE: some videos do not use the "hqURL", "sdURL", "ldURL" keywords. In...
author
Cyril Roelandt
<tipecaml@gmail.com>
Sun, 30 Sep 2012 13:19:48 +0000
(15:19 +0200)
committer
Cyril Roelandt
<tipecaml@gmail.com>
Sun, 30 Sep 2012 13:47:29 +0000
(15:47 +0200)
youtube_dl/InfoExtractors.py
patch
|
blob
|
history
diff --git
a/youtube_dl/InfoExtractors.py
b/youtube_dl/InfoExtractors.py
index bdb2ec3110321c2628b281d36062ffa1bdb0905f..d91221d4d157b5e36036d55a5fa6609094c60dae 100644
(file)
--- a/
youtube_dl/InfoExtractors.py
+++ b/
youtube_dl/InfoExtractors.py
@@
-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":"(.*?)",', urllib.unquote(webpage))
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