diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2015-10-13 21:14:33 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2015-10-13 21:14:33 +0200 |
commit | b30c4992a93d411f4f89faf2af153fc580138a90 (patch) | |
tree | 48b70e47a11fbf536722820411bb0482a542bdda /youtube_dl/extractor/channel9.py | |
parent | 5946cda7c6f2e4a7eb90fff6f10c66af0ff2a0d7 (diff) |
[channel9] Return a single dictionary for single videos (closes #7086)
Returning a list is deprecated.
Diffstat (limited to 'youtube_dl/extractor/channel9.py')
-rw-r--r-- | youtube_dl/extractor/channel9.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/youtube_dl/extractor/channel9.py b/youtube_dl/extractor/channel9.py index 3dfc24f5b..79fd0a30e 100644 --- a/youtube_dl/extractor/channel9.py +++ b/youtube_dl/extractor/channel9.py @@ -224,12 +224,12 @@ class Channel9IE(InfoExtractor): if contents is None: return contents - authors = self._extract_authors(html) + if len(contents) > 1: + raise ExtractorError('Got more than one entry') + result = contents[0] + result['authors'] = self._extract_authors(html) - for content in contents: - content['authors'] = authors - - return contents + return result def _extract_session(self, html, content_path): contents = self._extract_content(html, content_path) |