]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/dailymail.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / dailymail.py
index 67b88fd56234ee9448bd4d6cc33c4d4534eb672d..43401e111568b3977c7f5afc492e1b458ed63520 100644 (file)
@@ -1,8 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
-import re
-
 from .common import InfoExtractor
 from ..compat import compat_str
 from ..utils import (
@@ -15,6 +10,7 @@
 
 class DailyMailIE(InfoExtractor):
     _VALID_URL = r'https?://(?:www\.)?dailymail\.co\.uk/(?:video/[^/]+/video-|embed/video/)(?P<id>[0-9]+)'
+    _EMBED_REGEX = [r'<iframe\b[^>]+\bsrc=["\'](?P<url>(?:https?:)?//(?:www\.)?dailymail\.co\.uk/embed/video/\d+\.html)']
     _TESTS = [{
         'url': 'http://www.dailymail.co.uk/video/tvshowbiz/video-1295863/The-Mountain-appears-sparkling-water-ad-Heavy-Bubbles.html',
         'md5': 'f6129624562251f628296c3a9ffde124',
@@ -29,12 +25,6 @@ class DailyMailIE(InfoExtractor):
         'only_matching': True,
     }]
 
-    @staticmethod
-    def _extract_urls(webpage):
-        return re.findall(
-            r'<iframe\b[^>]+\bsrc=["\'](?P<url>(?:https?:)?//(?:www\.)?dailymail\.co\.uk/embed/video/\d+\.html)',
-            webpage)
-
     def _real_extract(self, url):
         video_id = self._match_id(url)
         webpage = self._download_webpage(url, video_id)
@@ -73,7 +63,6 @@ def _real_extract(self, url):
                 'protocol': protocol,
                 'ext': 'mp4' if is_hls else None,
             })
-        self._sort_formats(formats)
 
         return {
             'id': video_id,