1
0
Fork 0
mirror of https://codeberg.org/polarisfm/youtube-dl.git synced 2024-12-25 17:16:46 +00:00

[twitch] Use _form_hidden_inputs when logging in

This commit is contained in:
Sergey M․ 2015-07-10 21:49:39 +06:00
parent 27713812a0
commit a0aab26a41

View file

@ -59,9 +59,7 @@ class TwitchBaseIE(InfoExtractor):
login_page = self._download_webpage(
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': username.encode('utf-8'),