]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/ustudio.py
[extractor] Common function `_match_valid_url`
[yt-dlp.git] / yt_dlp / extractor / ustudio.py
index 56509beedc027ae9eae3f3f36d91be32238d729a..92509d1bf1ff144fe4340f97bc66e092bfae9dd3 100644 (file)
@@ -1,6 +1,5 @@
 from __future__ import unicode_literals
 
-import re
 
 from .common import InfoExtractor
 from ..utils import (
@@ -29,7 +28,7 @@ class UstudioIE(InfoExtractor):
     }
 
     def _real_extract(self, url):
-        video_id, display_id = re.match(self._VALID_URL, url).groups()
+        video_id, display_id = self._match_valid_url(url).groups()
 
         config = self._download_xml(
             'http://v1.ustudio.com/embed/%s/ustudio/config.xml' % video_id,
@@ -83,7 +82,7 @@ class UstudioEmbedIE(InfoExtractor):
     }
 
     def _real_extract(self, url):
-        uploader_id, video_id = re.match(self._VALID_URL, url).groups()
+        uploader_id, video_id = self._match_valid_url(url).groups()
         video_data = self._download_json(
             'http://app.ustudio.com/embed/%s/%s/config.json' % (uploader_id, video_id),
             video_id)['videos'][0]