From 1c724f4f28804f3f8e41d222576e6fc5d7e68f75 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Fri, 21 Jun 2019 22:29:25 -0700 Subject: Search: fix corrections not working --- youtube/search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube/search.py b/youtube/search.py index fcc352f..76a814c 100644 --- a/youtube/search.py +++ b/youtube/search.py @@ -86,7 +86,7 @@ def get_search_page(): continue if type == 'didYouMeanRenderer': renderer = renderer[type] - corrected_query_string = parameters.copy() + corrected_query_string = request.args.to_dict(flat=False) corrected_query_string['query'] = [renderer['correctedQueryEndpoint']['searchEndpoint']['query']] corrected_query_url = util.URL_ORIGIN + '/search?' + urllib.parse.urlencode(corrected_query_string, doseq=True) @@ -98,7 +98,7 @@ def get_search_page(): continue if type == 'showingResultsForRenderer': renderer = renderer[type] - no_autocorrect_query_string = parameters.copy() + no_autocorrect_query_string = request.args.to_dict(flat=False) no_autocorrect_query_string['autocorrect'] = ['0'] no_autocorrect_query_url = util.URL_ORIGIN + '/search?' + urllib.parse.urlencode(no_autocorrect_query_string, doseq=True) -- cgit v1.2.3