aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/compat.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-04-10 22:17:11 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-04-10 22:19:54 +0530
commitf7ad71607d0e733a602a9ae0493292b646d20fd4 (patch)
tree829639cad5d2f403fc59b40c79b936e53bfc3246 /yt_dlp/compat.py
parent68379de561a3f7bc51cf82b983c77d25cd596123 (diff)
downloadhypervideo-pre-f7ad71607d0e733a602a9ae0493292b646d20fd4.tar.lz
hypervideo-pre-f7ad71607d0e733a602a9ae0493292b646d20fd4.tar.xz
hypervideo-pre-f7ad71607d0e733a602a9ae0493292b646d20fd4.zip
Update to ytdl-commit-4fb25ff
[maoritv] Add new extractor https://github.com/ytdl-org/youtube-dl/commit/4fb25ff5a3be5206bb72e5c4046715b1529fb2c7 Except: [vimeo] improve extraction https://github.com/ytdl-org/youtube-dl/commit/3ae9c0f410b1d4f63e8bada67dd62a8d2852be32 [youtube:tab] Pass innertube context... https://github.com/ytdl-org/youtube-dl/commit/1b0a13f33cfb3644cc718d35951ea85bb1905459
Diffstat (limited to 'yt_dlp/compat.py')
-rw-r--r--yt_dlp/compat.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/yt_dlp/compat.py b/yt_dlp/compat.py
index 9659d480e..3ebf1ee7a 100644
--- a/yt_dlp/compat.py
+++ b/yt_dlp/compat.py
@@ -78,6 +78,15 @@ try:
except ImportError: # Python 2
import Cookie as compat_cookies
+if sys.version_info[0] == 2:
+ class compat_cookies_SimpleCookie(compat_cookies.SimpleCookie):
+ def load(self, rawdata):
+ if isinstance(rawdata, compat_str):
+ rawdata = str(rawdata)
+ return super(compat_cookies_SimpleCookie, self).load(rawdata)
+else:
+ compat_cookies_SimpleCookie = compat_cookies.SimpleCookie
+
try:
import html.entities as compat_html_entities
except ImportError: # Python 2
@@ -3020,6 +3029,7 @@ __all__ = [
'compat_cookiejar',
'compat_cookiejar_Cookie',
'compat_cookies',
+ 'compat_cookies_SimpleCookie',
'compat_ctypes_WINFUNCTYPE',
'compat_etree_Element',
'compat_etree_fromstring',