]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/myvi.py
[embedthumbnail] Fix thumbnail name in mp3 (#5163)
[yt-dlp.git] / yt_dlp / extractor / myvi.py
index b31cf4493ace8b9754b2dc0fa39f5f4c9a6cb324..df7200be20b065b074ddb8f314350e363bbee926 100644 (file)
@@ -1,5 +1,3 @@
-import re
-
 from .common import InfoExtractor
 from .vimple import SprutoBaseIE
 
@@ -26,6 +24,7 @@ class MyviIE(SprutoBaseIE):
                         )
                         (?P<id>[\da-zA-Z_-]+)
                     '''
+    _EMBED_REGEX = [r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//myvi\.(?:ru/player|tv)/(?:embed/html|flash)/[^"]+)\1']
     _TESTS = [{
         'url': 'http://myvi.ru/player/embed/html/oOy4euHA6LVwNNAjhD9_Jq5Ha2Qf0rtVMVFMAZav8wObeRTZaCATzucDQIDph8hQU0',
         'md5': '571bbdfba9f9ed229dc6d34cc0f335bf',
@@ -56,13 +55,6 @@ class MyviIE(SprutoBaseIE):
         'only_matching': True,
     }]
 
-    @classmethod
-    def _extract_url(cls, webpage):
-        mobj = re.search(
-            r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//myvi\.(?:ru/player|tv)/(?:embed/html|flash)/[^"]+)\1', webpage)
-        if mobj:
-            return mobj.group('url')
-
     def _real_extract(self, url):
         video_id = self._match_id(url)