projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fd8c8c7
)
[youtube] Fix authentication (Closes #10140)
author
Sergey M․
<dstftw@gmail.com>
Fri, 22 Jul 2016 14:05:39 +0000
(21:05 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Fri, 22 Jul 2016 14:05:39 +0000
(21:05 +0700)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 270ee886133d231bc74a5475c8e58fe7a583b45d..268080ba6c7f5833bd9f5da3201563cd164fa12e 100644
(file)
--- a/
youtube_dl/extractor/youtube.py
+++ b/
youtube_dl/extractor/youtube.py
@@
-53,6
+53,7
@@
class YoutubeBaseInfoExtractor(InfoExtractor):
"""Provide base functions for Youtube extractors"""
_LOGIN_URL = 'https://accounts.google.com/ServiceLogin'
_TWOFACTOR_URL = 'https://accounts.google.com/signin/challenge'
"""Provide base functions for Youtube extractors"""
_LOGIN_URL = 'https://accounts.google.com/ServiceLogin'
_TWOFACTOR_URL = 'https://accounts.google.com/signin/challenge'
+ _PASSWORD_CHALLENGE_URL = 'https://accounts.google.com/signin/challenge/sl/password'
_NETRC_MACHINE = 'youtube'
# If True it will raise an error if no login info is provided
_LOGIN_REQUIRED = False
_NETRC_MACHINE = 'youtube'
# If True it will raise an error if no login info is provided
_LOGIN_REQUIRED = False
@@
-116,12
+117,10
@@
class YoutubeBaseInfoExtractor(InfoExtractor):
'hl': 'en_US',
}
'hl': 'en_US',
}
- login_data = urlencode_postdata(login_form_strs)
-
- req = sanitized_Request(self._LOGIN_URL, login_data)
login_results = self._download_webpage(
login_results = self._download_webpage(
- req, None,
- note='Logging in', errnote='unable to log in', fatal=False)
+ self._PASSWORD_CHALLENGE_URL, None,
+ note='Logging in', errnote='unable to log in', fatal=False,
+ data=urlencode_postdata(login_form_strs))
if login_results is False:
return False
if login_results is False:
return False