aboutsummaryrefslogtreecommitdiffstats
path: root/youtube
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2018-10-30 14:54:20 -0700
committerJames Taylor <user234683@users.noreply.github.com>2018-10-30 14:54:20 -0700
commit316dce9f033155f327cf6ca9c97ae168eb844345 (patch)
treeff7d157295d13fe1eed72e678806706cdb90e2ce /youtube
parentcdf89465cc0d41bb5a404e6bcc05c34690fa04ff (diff)
downloadyt-local-316dce9f033155f327cf6ca9c97ae168eb844345.tar.lz
yt-local-316dce9f033155f327cf6ca9c97ae168eb844345.tar.xz
yt-local-316dce9f033155f327cf6ca9c97ae168eb844345.zip
Fix regression: autocorrect/did-you-mean causing failure on search
Diffstat (limited to 'youtube')
-rw-r--r--youtube/search.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube/search.py b/youtube/search.py
index 6df8bea..2237290 100644
--- a/youtube/search.py
+++ b/youtube/search.py
@@ -99,7 +99,7 @@ def get_search_page(query_string, parameters=()):
renderer = renderer[type]
corrected_query_string = urllib.parse.parse_qs(query_string)
corrected_query_string['query'] = [renderer['correctedQueryEndpoint']['searchEndpoint']['query']]
- corrected_query_url = URL_ORIGIN + '/search?' + common.make_query_string(corrected_query_string)
+ corrected_query_url = URL_ORIGIN + '/search?' + urllib.parse.urlencode(corrected_query_string, doseq=True)
corrections = did_you_mean.substitute(
corrected_query_url = corrected_query_url,
corrected_query = common.format_text_runs(renderer['correctedQuery']['runs']),
@@ -109,7 +109,7 @@ def get_search_page(query_string, parameters=()):
renderer = renderer[type]
no_autocorrect_query_string = urllib.parse.parse_qs(query_string)
no_autocorrect_query_string['autocorrect'] = ['0']
- no_autocorrect_query_url = URL_ORIGIN + '/search?' + common.make_query_string(no_autocorrect_query_string)
+ no_autocorrect_query_url = URL_ORIGIN + '/search?' + urllib.parse.urlencode(no_autocorrect_query_string, doseq=True)
corrections = showing_results_for.substitute(
corrected_query = common.format_text_runs(renderer['correctedQuery']['runs']),
original_query_url = no_autocorrect_query_url,