diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-11-28 04:37:02 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-11-28 04:37:02 +0100 |
commit | 9d93e7da6c23151272a91fbc2889c098e3b5f139 (patch) | |
tree | fa5ff870328b974afa27a402e44d9eb12aea8981 /youtube_dl/extractor/yahoo.py | |
parent | dcca796ce431da0d8b6927609c08938f22ba44cf (diff) | |
parent | 0e44d8381a439c84dd23477d32f7da4bb0a06293 (diff) |
Merge branch 'master' of github.com:rg3/youtube-dl
Diffstat (limited to 'youtube_dl/extractor/yahoo.py')
-rw-r--r-- | youtube_dl/extractor/yahoo.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/youtube_dl/extractor/yahoo.py b/youtube_dl/extractor/yahoo.py index 34e6afb20..617e3bb06 100644 --- a/youtube_dl/extractor/yahoo.py +++ b/youtube_dl/extractor/yahoo.py @@ -46,7 +46,7 @@ class YahooIE(InfoExtractor): video_id = mobj.group('id') webpage = self._download_webpage(url, video_id) - items_json = self._search_regex(r'YVIDEO_INIT_ITEMS = ({.*?});$', + items_json = self._search_regex(r'mediaItems: ({.*?})$', webpage, u'items', flags=re.MULTILINE) items = json.loads(items_json) info = items['mediaItems']['query']['results']['mediaObj'][0] @@ -91,17 +91,13 @@ class YahooIE(InfoExtractor): formats.append(format_info) formats = sorted(formats, key=lambda f:(f['height'], f['width'])) - info = { + return { 'id': video_id, 'title': meta['title'], 'formats': formats, 'description': clean_html(meta['description']), 'thumbnail': meta['thumbnail'], } - # TODO: Remove when #980 has been merged - info.update(formats[-1]) - - return info class YahooSearchIE(SearchInfoExtractor): |