Fix imports and general cleanup
[youtube-dl] / youtube_dl / extractor / vuclip.py
index ab1e7946eabc391da8f0a52600e6ef6fbd4acba3..c3fde53f5ef06a56b54e94b20b72a7e98c1992a5 100644 (file)
@@ -3,8 +3,10 @@ from __future__ import unicode_literals
 import re
 
 from .common import InfoExtractor
-from ..utils import (
+from ..compat import (
     compat_urllib_parse_urlparse,
+)
+from ..utils import (
     ExtractorError,
     parse_duration,
     qualities,
@@ -25,10 +27,9 @@ class VuClipIE(InfoExtractor):
     }
 
     def _real_extract(self, url):
-        mobj = re.match(self._VALID_URL, url)
-        video_id = mobj.group('id')
-
+        video_id = self._match_id(url)
         webpage = self._download_webpage(url, video_id)
+
         ad_m = re.search(
             r'''value="No.*?" onClick="location.href='([^"']+)'"''', webpage)
         if ad_m:
@@ -53,7 +54,7 @@ class VuClipIE(InfoExtractor):
                 )
                 (.*?)
                 (?:
-                    <a\s+href="fblike'|<div\s+class="social">
+                    <a\s+href="fblike|<div\s+class="social">
                 )
             ''', webpage, 'links')
         title = self._html_search_regex(