]> git.bitcoin.ninja Git - youtube-dl/commitdiff
Add a method for extracting info from a list of urls
authorJaime Marquínez Ferrándiz <jaimemf93@gmail.com>
Mon, 4 Mar 2013 21:16:42 +0000 (22:16 +0100)
committerJaime Marquínez Ferrándiz <jaimemf93@gmail.com>
Mon, 4 Mar 2013 21:16:42 +0000 (22:16 +0100)
youtube_dl/FileDownloader.py

index b26c34729cab9b44ea90e7dcf3158bc4ffb4b94f..f668b362b6c16ff0add504ff16ad860efc420211 100644 (file)
@@ -415,6 +415,14 @@ class FileDownloader(object):
                     raise
         if not suitable_found:
                 self.trouble(u'ERROR: no suitable InfoExtractor: %s' % url)
+    def extract_info_iterable(self, urls):
+        '''
+            Return the videos founded for the urls
+        '''
+        results = []
+        for url in urls:
+            results.extend(self.extract_info(url))
+        return results
 
     def process_info(self, info_dict):
         """Process a single dictionary returned by an InfoExtractor."""