implement max_results option and infinite search for youtube

This commit is contained in:
Christophe Benz 2010-08-11 21:35:20 +02:00
commit 53f6571fee
7 changed files with 82 additions and 31 deletions

View file

@ -51,5 +51,6 @@ class Videoob(ConsoleApplication):
def command_search(self, pattern=None):
self.load_backends(ICapVideo)
self.set_formatter_header(u'Search pattern: %s' % pattern if pattern else u'Latest videos')
for backend, video in self.do('iter_search_results', pattern=pattern, nsfw=self.options.nsfw):
for backend, video in self.do('iter_search_results', pattern=pattern, nsfw=self.options.nsfw,
max_results=self.options.count):
self.format(video, backend.name)