[shared] Extend _VALID_URL to support vivo.sx (Closes #6681)
[youtube-dl] / youtube_dl / extractor / shared.py
index 6e2b94e7d5b7f30076b910d12e7bf1b371062dc0..000ef1a0723d2b6ceb9b047924e0490386369060 100644 (file)
@@ -14,7 +14,7 @@ from ..utils import (
 
 
 class SharedIE(InfoExtractor):
-    _VALID_URL = r'http://shared\.sx/(?P<id>[\da-z]{10})'
+    _VALID_URL = r'http://(?:shared|vivo)\.sx/(?P<id>[\da-z]{10})'
 
     _TEST = {
         'url': 'http://shared.sx/0060718775',
@@ -34,7 +34,7 @@ class SharedIE(InfoExtractor):
             raise ExtractorError(
                 'Video %s does not exist' % video_id, expected=True)
 
-        download_form = self._form_hidden_inputs(webpage)
+        download_form = self._hidden_inputs(webpage)
         request = compat_urllib_request.Request(
             url, compat_urllib_parse.urlencode(download_form))
         request.add_header('Content-Type', 'application/x-www-form-urlencoded')