diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2016-03-04 22:18:40 +0100 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2016-03-04 22:18:40 +0100 |
commit | 3233a68fbb1cb608534db43f358f7203e59cd2de (patch) | |
tree | 78f2706cd862c7f82cc6dd7d74a46c1e39bdc05f | |
parent | cf074e5ddd3840071df78ec509bcd74520a8f425 (diff) |
[utils] update_url_query: Encode the strings in the query dict
The test case with {'test': '第二行тест'} was failing on python 2 (the non-ascii characters were replaced with '?').
-rw-r--r-- | youtube_dl/utils.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index d431aa6b7..22a39a0ab 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -1743,6 +1743,7 @@ def update_url_query(url, query): parsed_url = compat_urlparse.urlparse(url) qs = compat_parse_qs(parsed_url.query) qs.update(query) + qs = encode_dict(qs) return compat_urlparse.urlunparse(parsed_url._replace( query=compat_urllib_parse.urlencode(qs, True))) |