Changed ytsearchall to retrieve max 1000 results
authordannyc@omega <dannyc@omega>
Tue, 7 Apr 2009 00:39:16 +0000 (17:39 -0700)
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>
Sun, 31 Oct 2010 10:24:07 +0000 (11:24 +0100)
youtube-dl

index 2cddafcf54bb9bb2478928d9675080394cc57e0d..e41134546eab4c7fb385d64b76aa0a90e8c36c2d 100755 (executable)
@@ -751,6 +751,7 @@ class YoutubeSearchIE(InfoExtractor):
        _VIDEO_INDICATOR = r'href="/watch\?v=.+?"'
        _MORE_PAGES_INDICATOR = r'>Next</a>'
        _youtube_ie = None
+       _max_youtube_results = 1000
 
        def __init__(self, youtube_ie, downloader=None):
                InfoExtractor.__init__(self, downloader)
@@ -778,7 +779,7 @@ class YoutubeSearchIE(InfoExtractor):
                if prefix == '':
                        return self._download_n_results(query, 1)
                elif prefix == 'all':
-                       return self._download_n_results(query, -1)
+                       return self._download_n_results(query, self._max_youtube_results)
                else:
                        try:
                                n = int(prefix)