فهرست منبع

Changed ytsearchall to retrieve max 1000 results

dannyc@omega 16 سال پیش
والد
کامیت
fd9288c315
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      youtube-dl

+ 2 - 1
youtube-dl

@@ -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)