diff options
author | coletdjnz <coletdjnz@protonmail.com> | 2022-02-04 10:25:38 +1300 |
---|---|---|
committer | coletdjnz <coletdjnz@protonmail.com> | 2022-02-04 10:32:56 +1300 |
commit | af5c1c553e0147fad5f386f42058186e1952ee4e (patch) | |
tree | f54eee33335bdc6957f37a775dbf1869a8dcdd13 | |
parent | 3cea9ec2eb63fae38878dbf0bee4d7da5d954fab (diff) | |
download | hypervideo-pre-af5c1c553e0147fad5f386f42058186e1952ee4e.tar.lz hypervideo-pre-af5c1c553e0147fad5f386f42058186e1952ee4e.tar.xz hypervideo-pre-af5c1c553e0147fad5f386f42058186e1952ee4e.zip |
[youtube] Fix search extractor
Regression introduced in https://github.com/yt-dlp/yt-dlp/commit/16aa9ea41dd0a575c6c2d6945d3f8fe3bb42b327. Closes #2628
Authored-by: coletdjnz
-rw-r--r-- | yt_dlp/extractor/youtube.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index cd9a1b774..3c2d3347f 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -4273,7 +4273,7 @@ class YoutubeTabBaseInfoExtractor(YoutubeBaseInfoExtractor): _SEARCH_PARAMS = None - def _search_results(self, query, params=NO_DEFAULT, client=None): + def _search_results(self, query, params=NO_DEFAULT, default_client='web'): data = {'query': query} if params is NO_DEFAULT: params = self._SEARCH_PARAMS @@ -4294,7 +4294,7 @@ class YoutubeTabBaseInfoExtractor(YoutubeBaseInfoExtractor): data.update(continuation_list[0] or {}) search = self._extract_response( item_id='query "%s" page %s' % (query, page_num), ep='search', query=data, - default_client=client, check_get_keys=check_get_keys) + default_client=default_client, check_get_keys=check_get_keys) slr_contents = traverse_obj(search, *content_keys) yield from self._extract_entries({'contents': list(variadic(slr_contents))}, continuation_list) if not continuation_list[0]: @@ -5402,7 +5402,7 @@ class YoutubeMusicSearchURLIE(YoutubeTabBaseInfoExtractor): if not params: section = None title = join_nonempty(query, section, delim=' - ') - return self.playlist_result(self._search_results(query, params, client='web_music'), title, title) + return self.playlist_result(self._search_results(query, params, default_client='web_music'), title, title) class YoutubeFeedsInfoExtractor(InfoExtractor): |