[channel9] Return a single dictionary for single videos (closes #7086)
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 13 Oct 2015 19:14:33 +0000 (21:14 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 13 Oct 2015 19:14:33 +0000 (21:14 +0200)
Returning a list is deprecated.

youtube_dl/extractor/channel9.py

index 3dfc24f5ba447ea92858e89868ad3684caf3a6d2..79fd0a30ed9dde5389e37db393de829bafdced9c 100644 (file)
@@ -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)