diff options
author | Sergey M․ <[email protected]> | 2020-05-05 06:00:37 +0700 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2020-05-05 06:00:37 +0700 |
commit | 6c22cee673f59407a63b2916d8f0623a95a8ea20 (patch) | |
tree | d43713fd2a56aeb10361c894a7df4931427bab41 | |
parent | 6d874fee2a4b54272c48960f3082072d37a7e0ae (diff) | |
download | youtube-dl-6c22cee673f59407a63b2916d8f0623a95a8ea20.tar.gz youtube-dl-6c22cee673f59407a63b2916d8f0623a95a8ea20.zip |
[extractor/common] Use compat_cookiejar_Cookie for _set_cookie (closes #23256, closes #24776)
To always ensure cookie name and value are bytestrings on python 2.
-rw-r--r-- | youtube_dl/extractor/common.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index e9306d806..a61753b17 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -15,7 +15,7 @@ import time import math from ..compat import ( - compat_cookiejar, + compat_cookiejar_Cookie, compat_cookies, compat_etree_Element, compat_etree_fromstring, @@ -2843,7 +2843,7 @@ class InfoExtractor(object): def _set_cookie(self, domain, name, value, expire_time=None, port=None, path='/', secure=False, discard=False, rest={}, **kwargs): - cookie = compat_cookiejar.Cookie( + cookie = compat_cookiejar_Cookie( 0, name, value, port, port is not None, domain, True, domain.startswith('.'), path, True, secure, expire_time, discard, None, None, rest) |