]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[vk] Use `_form_hidden_inputs` when logging in
authorSergey M․ <dstftw@gmail.com>
Fri, 10 Jul 2015 15:52:03 +0000 (21:52 +0600)
committerSergey M․ <dstftw@gmail.com>
Fri, 10 Jul 2015 15:52:03 +0000 (21:52 +0600)
youtube_dl/extractor/vk.py

index 23d153031f5bcbfd9014920df0fdfec7a4a7fce6..c0292095bab55d792249fedd03a7d927a98763e5 100644 (file)
@@ -154,9 +154,7 @@ class VKIE(InfoExtractor):
         login_page = self._download_webpage(
             'https://vk.com', 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({
             'email': username.encode('cp1251'),