]> 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 db93b018252d23bfa66c34b4161c56e1d14c568e..b092ecad5a8779703de2aa5af159b0011dfffbd0 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import unicode_literals
-
 import re
 
 from ..utils import (
@@ -11,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',
@@ -31,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)