mirror of
https://github.com/blackjack4494/yt-dlc.git
synced 2024-12-23 00:07:49 +00:00
Changed ytsearchall to retrieve max 1000 results
This commit is contained in:
parent
1db4ff6054
commit
fd9288c315
1 changed files with 2 additions and 1 deletions
|
@ -751,6 +751,7 @@ class YoutubeSearchIE(InfoExtractor):
|
||||||
_VIDEO_INDICATOR = r'href="/watch\?v=.+?"'
|
_VIDEO_INDICATOR = r'href="/watch\?v=.+?"'
|
||||||
_MORE_PAGES_INDICATOR = r'>Next</a>'
|
_MORE_PAGES_INDICATOR = r'>Next</a>'
|
||||||
_youtube_ie = None
|
_youtube_ie = None
|
||||||
|
_max_youtube_results = 1000
|
||||||
|
|
||||||
def __init__(self, youtube_ie, downloader=None):
|
def __init__(self, youtube_ie, downloader=None):
|
||||||
InfoExtractor.__init__(self, downloader)
|
InfoExtractor.__init__(self, downloader)
|
||||||
|
@ -778,7 +779,7 @@ class YoutubeSearchIE(InfoExtractor):
|
||||||
if prefix == '':
|
if prefix == '':
|
||||||
return self._download_n_results(query, 1)
|
return self._download_n_results(query, 1)
|
||||||
elif prefix == 'all':
|
elif prefix == 'all':
|
||||||
return self._download_n_results(query, -1)
|
return self._download_n_results(query, self._max_youtube_results)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
n = int(prefix)
|
n = int(prefix)
|
||||||
|
|
Loading…
Reference in a new issue