aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/common.py
diff options
context:
space:
mode:
authorfelix <felix.von.s@posteo.de>2021-12-30 13:23:36 +0100
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-04-12 05:32:50 +0530
commitcfb0511d822b39748c5a64dfe86b61ff8d5af176 (patch)
tree3988b2fd19f0b1bdf5e946381a1e96d86b39a2c0 /yt_dlp/extractor/common.py
parentab96d1ad1bcdb943aa6519980e5383ca91f7da2b (diff)
downloadhypervideo-pre-cfb0511d822b39748c5a64dfe86b61ff8d5af176.tar.lz
hypervideo-pre-cfb0511d822b39748c5a64dfe86b61ff8d5af176.tar.xz
hypervideo-pre-cfb0511d822b39748c5a64dfe86b61ff8d5af176.zip
[cleanup] Remove unused code paths (#2173)
Notes: * `_windows_write_string`: Fixed in 3.6 * https://bugs.python.org/issue1602 * PEP: https://www.python.org/dev/peps/pep-0528 * Windows UTF-8 fix: Fixed in 3.3 * https://bugs.python.org/issue13216 * `__loader__`: is always present in 3.3+ * https://bugs.python.org/issue14646 * `workaround_optparse_bug9161`: Fixed in 2.7 * https://bugs.python.org/issue9161 Authored by: fstirlitz
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r--yt_dlp/extractor/common.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index 9914910d0..48f302f86 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -3606,9 +3606,7 @@ class InfoExtractor(object):
for header, cookies in url_handle.headers.items():
if header.lower() != 'set-cookie':
continue
- if sys.version_info[0] >= 3:
- cookies = cookies.encode('iso-8859-1')
- cookies = cookies.decode('utf-8')
+ cookies = cookies.encode('iso-8859-1').decode('utf-8')
cookie_value = re.search(
r'%s=(.+?);.*?\b[Dd]omain=(.+?)(?:[,;]|$)' % cookie, cookies)
if cookie_value: