Logic fix in BrowsingMixin().search()
Simple addition of indentation so the if statement is evaluated only if the previous one is true. Found with video_id `gzo0xPx26hs`.
This commit is contained in:
parent
0d419fb68f
commit
9af106b464
1 changed files with 7 additions and 7 deletions
|
|
@ -104,15 +104,15 @@ class BrowsingMixin:
|
||||||
type = filter[:-1] if filter else None
|
type = filter[:-1] if filter else None
|
||||||
search_results = self.parser.parse_search_results(results, type)
|
search_results = self.parser.parse_search_results(results, type)
|
||||||
|
|
||||||
if 'continuations' in res['musicShelfRenderer']:
|
if 'continuations' in res['musicShelfRenderer']:
|
||||||
request_func = lambda additionalParams: self._send_request(
|
request_func = lambda additionalParams: self._send_request(
|
||||||
endpoint, body, additionalParams)
|
endpoint, body, additionalParams)
|
||||||
|
|
||||||
parse_func = lambda contents: self.parser.parse_search_results(contents, type)
|
parse_func = lambda contents: self.parser.parse_search_results(contents, type)
|
||||||
|
|
||||||
search_results.extend(
|
search_results.extend(
|
||||||
get_continuations(res['musicShelfRenderer'], 'musicShelfContinuation',
|
get_continuations(res['musicShelfRenderer'], 'musicShelfContinuation',
|
||||||
limit - len(search_results), request_func, parse_func))
|
limit - len(search_results), request_func, parse_func))
|
||||||
|
|
||||||
return search_results
|
return search_results
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue