Revert "[utils] Add support for cookies with spaces used instead of tabs"
According to [1] TABs must be used as separators between fields.
Files produces by some tools with spaces as separators are considered
malformed.
1. https://curl.haxx.se/docs/http-cookies.html
This reverts commit cff99c91d1
.
This commit is contained in:
parent
68fa15155f
commit
042b664933
3 changed files with 5 additions and 19 deletions
|
@ -2752,11 +2752,6 @@ class YoutubeDLCookieJar(compat_cookiejar.MozillaCookieJar):
|
|||
for line in f:
|
||||
if line.startswith(self._HTTPONLY_PREFIX):
|
||||
line = line[len(self._HTTPONLY_PREFIX):]
|
||||
# Cookie file may contain spaces instead of tabs.
|
||||
# Replace all spaces with tabs to make such cookie files work
|
||||
# with MozillaCookieJar.
|
||||
if not line.startswith('#'):
|
||||
line = re.sub(r' +', r'\t', line)
|
||||
cf.write(compat_str(line))
|
||||
cf.seek(0)
|
||||
self._really_load(cf, filename, ignore_discard, ignore_expires)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue