projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e15ad9e
)
[vk] Fix authentication on python3
author
Sergey M․
<dstftw@gmail.com>
Wed, 17 Aug 2016 22:22:23 +0000
(
05:22
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Wed, 17 Aug 2016 22:22:23 +0000
(
05:22
+0700)
youtube_dl/extractor/vk.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/vk.py
b/youtube_dl/extractor/vk.py
index 3ee66e23e22b1d5350148d5cb21c2f55e4885f75..634d17d9193b9a6a2faae0b33027f3185541b2d1 100644
(file)
--- 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.
# 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')
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)
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,
login_page = self._download_webpage(
'https://login.vk.com/?act=login', None,