]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/tube8.py
[extractors] Use new framework for existing embeds (#4307)
[yt-dlp.git] / yt_dlp / extractor / tube8.py
index 32e80d9d2a9479ce03576843a8401dfe1e12df9f..b092ecad5a8779703de2aa5af159b0011dfffbd0 100644 (file)
@@ -9,6 +9,7 @@
 
 class Tube8IE(KeezMoviesIE):
     _VALID_URL = r'https?://(?:www\.)?tube8\.com/(?:[^/]+/)+(?P<display_id>[^/]+)/(?P<id>\d+)'
+    _EMBED_REGEX = [r'<iframe[^>]+\bsrc=["\'](?P<url>(?:https?:)?//(?:www\.)?tube8\.com/embed/(?:[^/]+/)+\d+)']
     _TESTS = [{
         'url': 'http://www.tube8.com/teen/kasia-music-video/229795/',
         'md5': '65e20c48e6abff62ed0c3965fff13a39',
@@ -29,12 +30,6 @@ class Tube8IE(KeezMoviesIE):
         'only_matching': True,
     }]
 
-    @staticmethod
-    def _extract_urls(webpage):
-        return re.findall(
-            r'<iframe[^>]+\bsrc=["\']((?:https?:)?//(?:www\.)?tube8\.com/embed/(?:[^/]+/)+\d+)',
-            webpage)
-
     def _real_extract(self, url):
         webpage, info = self._extract_info(url)