diff options
| author | Cyril Roelandt <tipecaml@gmail.com> | 2012-09-30 15:19:48 +0200 | 
|---|---|---|
| committer | Cyril Roelandt <tipecaml@gmail.com> | 2012-09-30 15:47:29 +0200 | 
| commit | 7b6d7001d87ba93386c653f6e8c3a08b32f4ba4c (patch) | |
| tree | f3c37ef29698fb2b387884bb15c8495e30c3bbfc /youtube_dl/InfoExtractors.py | |
| parent | 39ce6e79e7dc8db5f77c1af161af8feb64bbcc33 (diff) | |
DailymotionIE: some videos do not use the "hqURL", "sdURL", "ldURL" keywords. In this case, the "video_url" keyword should be looked for.
Diffstat (limited to 'youtube_dl/InfoExtractors.py')
| -rw-r--r-- | youtube_dl/InfoExtractors.py | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index bdb2ec311..d91221d4d 100644 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -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":"(.*?)",', 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 | 
