[played] Use `_form_hidden_inputs`
authorSergey M․ <dstftw@gmail.com>
Fri, 10 Jul 2015 15:57:29 +0000 (21:57 +0600)
committerSergey M․ <dstftw@gmail.com>
Fri, 10 Jul 2015 15:57:29 +0000 (21:57 +0600)
youtube_dl/extractor/played.py

index 45716c75d9505c5fcb7e8c6d73ec4feaef298aee..9fe1524f2505b16b13b020fa89b791bd504b3ed4 100644 (file)
@@ -38,9 +38,7 @@ class PlayedIE(InfoExtractor):
         if m_error:
             raise ExtractorError(m_error.group('msg'), expected=True)
 
-        fields = re.findall(
-            r'type="hidden" name="([^"]+)"\s+value="([^"]+)">', orig_webpage)
-        data = dict(fields)
+        data = self._form_hidden_inputs(orig_webpage)
 
         self._sleep(2, video_id)