diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-04-29 04:49:44 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-04-29 05:20:18 +0530 |
commit | f5fa042c82300218a2d07b95dd6b9c0756745db3 (patch) | |
tree | ae850765e180b5bde406bca726bb34a1c5a42fcd | |
parent | 07e4a40a9a3b636a61e4cb2bc38bc4dfa8632004 (diff) | |
download | hypervideo-pre-f5fa042c82300218a2d07b95dd6b9c0756745db3.tar.lz hypervideo-pre-f5fa042c82300218a2d07b95dd6b9c0756745db3.tar.xz hypervideo-pre-f5fa042c82300218a2d07b95dd6b9c0756745db3.zip |
Revert "[utils] Encode URLs in `YoutubeDLCookieProcessor`"
This reverts commit 915f911e365736227e134ad654601443dbfd7ccb.
When the request is copied, `unredirected_hdrs` are not copied, which causes issues elsewhere
Reopens #263
-rw-r--r-- | yt_dlp/utils.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 9ddd6453f..1322c3aaa 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -2926,15 +2926,7 @@ class YoutubeDLCookieProcessor(compat_urllib_request.HTTPCookieProcessor): # response.headers[set_cookie_header] = set_cookie_escaped return compat_urllib_request.HTTPCookieProcessor.http_response(self, request, response) - def http_request(self, request): - # If the URL contains non-ASCII characters, the cookies - # are lost before the request reaches YoutubeDLHandler. - # So we percent encode the url before adding cookies - # See: https://github.com/yt-dlp/yt-dlp/issues/263 - request = update_Request(request, url=escape_url(request.get_full_url())) - return compat_urllib_request.HTTPCookieProcessor.http_request(self, request) - - https_request = http_request + https_request = compat_urllib_request.HTTPCookieProcessor.http_request https_response = http_response |