From f65ebef2ebc11af17f9ef2cbbc947ec4de64d83e Mon Sep 17 00:00:00 2001 From: James Taylor Date: Fri, 27 Jul 2018 18:54:55 -0700 Subject: fix 502 bad gateway when searching --- youtube/search.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'youtube') diff --git a/youtube/search.py b/youtube/search.py index 0f77595..faa8a3c 100644 --- a/youtube/search.py +++ b/youtube/search.py @@ -57,7 +57,8 @@ def get_search_json(query, page, autocorrect, sort): 'X-YouTube-Client-Name': '1', 'X-YouTube-Client-Version': '2.20180418', } - url += "&pbj=1&sp=" + page_number_to_sp_parameter(page, autocorrect, sort) + url += "&pbj=1&sp=" + page_number_to_sp_parameter(page, autocorrect, sort).replace("=", "%3D") + print(url) content = common.fetch_url(url, headers=headers) info = json.loads(content) return info -- cgit v1.2.3