Browse Source

[twitch] Use `_form_hidden_inputs` when logging in

totalwebcasting
Sergey M․ 9 years ago
parent
commit
a0aab26a41
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      youtube_dl/extractor/twitch.py

+ 1
- 3
youtube_dl/extractor/twitch.py View File

@ -59,9 +59,7 @@ class TwitchBaseIE(InfoExtractor):
login_page = self._download_webpage( login_page = self._download_webpage(
self._LOGIN_URL, None, 'Downloading login page') self._LOGIN_URL, None, 'Downloading login page')
login_form = dict(re.findall(
r'<input\s+type="hidden"\s+name="([^"]+)"\s+(?:id="[^"]+"\s+)?value="([^"]*)"',
login_page))
login_form = self._form_hidden_inputs(login_page)
login_form.update({ login_form.update({
'login': username.encode('utf-8'), 'login': username.encode('utf-8'),


Loading…
Cancel
Save