diff options
author | James Taylor <user234683@users.noreply.github.com> | 2018-07-27 18:54:55 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2018-07-27 18:54:55 -0700 |
commit | f65ebef2ebc11af17f9ef2cbbc947ec4de64d83e (patch) | |
tree | 2781fe25a144b5a704edb90854774494468ce11b | |
parent | 182a2f3bdbc8f7a349c7eb407b21d68a8d664c86 (diff) | |
download | yt-local-f65ebef2ebc11af17f9ef2cbbc947ec4de64d83e.tar.lz yt-local-f65ebef2ebc11af17f9ef2cbbc947ec4de64d83e.tar.xz yt-local-f65ebef2ebc11af17f9ef2cbbc947ec4de64d83e.zip |
fix 502 bad gateway when searching
-rw-r--r-- | youtube/search.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |