mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-19 20:10:25 +00:00
[youtube] Fix login (Fixes #1681)
This commit is contained in:
parent
646e17a53d
commit
795f28f871
@ -74,14 +74,8 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
|
|||||||
self._downloader.report_warning(u'unable to fetch login page: %s' % compat_str(err))
|
self._downloader.report_warning(u'unable to fetch login page: %s' % compat_str(err))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
galx = None
|
galx = self._search_regex(r'(?s)<input.+?name="GALX".+?value="(.+?)"',
|
||||||
dsh = None
|
login_page, u'Login GALX parameter')
|
||||||
match = re.search(re.compile(r'<input.+?name="GALX".+?value="(.+?)"', re.DOTALL), login_page)
|
|
||||||
if match:
|
|
||||||
galx = match.group(1)
|
|
||||||
match = re.search(re.compile(r'<input.+?name="dsh".+?value="(.+?)"', re.DOTALL), login_page)
|
|
||||||
if match:
|
|
||||||
dsh = match.group(1)
|
|
||||||
|
|
||||||
# Log in
|
# Log in
|
||||||
login_form_strs = {
|
login_form_strs = {
|
||||||
@ -95,7 +89,6 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
|
|||||||
u'checkConnection': u'',
|
u'checkConnection': u'',
|
||||||
u'checkedDomains': u'youtube',
|
u'checkedDomains': u'youtube',
|
||||||
u'dnConn': u'',
|
u'dnConn': u'',
|
||||||
u'dsh': dsh,
|
|
||||||
u'pstMsg': u'0',
|
u'pstMsg': u'0',
|
||||||
u'rmShown': u'1',
|
u'rmShown': u'1',
|
||||||
u'secTok': u'',
|
u'secTok': u'',
|
||||||
|
Loading…
Reference in New Issue
Block a user