]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/spankwire.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / spankwire.py
index 603f17e9daf2afdf63cdde862afc82d4d4fd9115..334b29773c5afe3d6d479aebb06c5ba373deae5d 100644 (file)
@@ -21,6 +21,7 @@ class SpankwireIE(InfoExtractor):
                         )
                         (?P<id>\d+)
                     '''
+    _EMBED_REGEX = [r'<iframe[^>]+\bsrc=["\'](?P<url>(?:https?:)?//(?:www\.)?spankwire\.com/EmbedPlayer\.aspx/?\?.*?\bArticleId=\d+)']
     _TESTS = [{
         # download URL pattern: */<height>P_<tbr>K_<video_id>.mp4
         'url': 'http://www.spankwire.com/Buckcherry-s-X-Rated-Music-Video-Crazy-Bitch/video103545/',
@@ -65,12 +66,6 @@ class SpankwireIE(InfoExtractor):
         'only_matching': True,
     }]
 
-    @staticmethod
-    def _extract_urls(webpage):
-        return re.findall(
-            r'<iframe[^>]+\bsrc=["\']((?:https?:)?//(?:www\.)?spankwire\.com/EmbedPlayer\.aspx/?\?.*?\bArticleId=\d+)',
-            webpage)
-
     def _real_extract(self, url):
         video_id = self._match_id(url)
 
@@ -106,7 +101,6 @@ def _real_extract(self, url):
             formats.extend(self._extract_m3u8_formats(
                 m3u8_url, video_id, 'mp4', entry_protocol='m3u8_native',
                 m3u8_id='hls', fatal=False))
-        self._sort_formats(formats)
 
         view_count = str_to_int(video.get('viewed'))