diff options
| author | Sergey M․ <dstftw@gmail.com> | 2016-08-18 05:22:23 +0700 | 
|---|---|---|
| committer | Sergey M․ <dstftw@gmail.com> | 2016-08-18 05:22:23 +0700 | 
| commit | 08a42f9c741aa37a599e6fe54ec8b9660df117e5 (patch) | |
| tree | 1a5ba91a99c1df567f25f485e1d27ecd24d76e15 /youtube_dl/extractor/vk.py | |
| parent | e15ad9ef097253e27c7d2e78a470adaa032e8bfa (diff) | |
[vk] Fix authentication on python3
Diffstat (limited to 'youtube_dl/extractor/vk.py')
| -rw-r--r-- | youtube_dl/extractor/vk.py | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/youtube_dl/extractor/vk.py b/youtube_dl/extractor/vk.py index 3ee66e23e..634d17d91 100644 --- a/youtube_dl/extractor/vk.py +++ b/youtube_dl/extractor/vk.py @@ -52,8 +52,9 @@ class VKBaseIE(InfoExtractor):          # 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 @@ class VKBaseIE(InfoExtractor):              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, | 
