0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-23 02:25:11 +00:00

[vk] Fix authentication on python3

This commit is contained in:
Sergey M․ 2016-08-18 05:22:23 +07:00
parent e15ad9ef09
commit 08a42f9c74
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -52,8 +52,9 @@ def _login(self):
# what actually happens.
# We will workaround this VK issue by resetting the remixlhk cookie to
# the first one manually.
cookies = url_handle.headers.get('Set-Cookie')
if cookies:
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')
@ -61,6 +62,7 @@ def _login(self):
if remixlhk:
value, domain = remixlhk.groups()
self._set_cookie(domain, 'remixlhk', value)
break
login_page = self._download_webpage(
'https://login.vk.com/?act=login', None,