mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-04 23:43:20 +00:00
GoogleSearchIE: rename _download_n_results to _get_n_results
This commit is contained in:
parent
be74864ace
commit
43b62accbb
|
@ -1465,9 +1465,9 @@ def _real_extract(self, query):
|
||||||
prefix = mobj.group('prefix')
|
prefix = mobj.group('prefix')
|
||||||
query = mobj.group('query')
|
query = mobj.group('query')
|
||||||
if prefix == '':
|
if prefix == '':
|
||||||
return self._download_n_results(query, 1)
|
return self._get_n_results(query, 1)
|
||||||
elif prefix == 'all':
|
elif prefix == 'all':
|
||||||
return self._download_n_results(query, self._max_google_results)
|
return self._get_n_results(query, self._max_google_results)
|
||||||
else:
|
else:
|
||||||
n = int(prefix)
|
n = int(prefix)
|
||||||
if n <= 0:
|
if n <= 0:
|
||||||
|
@ -1475,10 +1475,10 @@ def _real_extract(self, query):
|
||||||
elif n > self._max_google_results:
|
elif n > self._max_google_results:
|
||||||
self._downloader.report_warning(u'gvsearch returns max %i results (you requested %i)' % (self._max_google_results, n))
|
self._downloader.report_warning(u'gvsearch returns max %i results (you requested %i)' % (self._max_google_results, n))
|
||||||
n = self._max_google_results
|
n = self._max_google_results
|
||||||
return self._download_n_results(query, n)
|
return self._get_n_results(query, n)
|
||||||
|
|
||||||
def _download_n_results(self, query, n):
|
def _get_n_results(self, query, n):
|
||||||
"""Downloads a specified number of results for a query"""
|
"""Get a specified number of results for a query"""
|
||||||
|
|
||||||
res = {
|
res = {
|
||||||
'_type': 'playlist',
|
'_type': 'playlist',
|
||||||
|
|
Loading…
Reference in a new issue