]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/amcnetworks.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / amcnetworks.py
index 1f16d3a33be2123a0d4252ecb2454db62f91c24a..c58bc7bfbf8ffbfe5e362e27d43a90e0a712f645 100644 (file)
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 import re
 
 from .theplatform import ThePlatformIE
@@ -12,7 +9,7 @@
 )
 
 
-class AMCNetworksIE(ThePlatformIE):
+class AMCNetworksIE(ThePlatformIE):  # XXX: Do not subclass from concrete IE
     _VALID_URL = r'https?://(?:www\.)?(?P<site>amc|bbcamerica|ifc|(?:we|sundance)tv)\.com/(?P<id>(?:movies|shows(?:/[^/]+)+)/[^/?#&]+)'
     _TESTS = [{
         'url': 'https://www.bbcamerica.com/shows/the-graham-norton-show/videos/tina-feys-adorable-airline-themed-family-dinner--51631',
@@ -63,7 +60,7 @@ class AMCNetworksIE(ThePlatformIE):
     }
 
     def _real_extract(self, url):
-        site, display_id = re.match(self._VALID_URL, url).groups()
+        site, display_id = self._match_valid_url(url).groups()
         requestor_id = self._REQUESTOR_ID_MAP[site]
         page_data = self._download_json(
             'https://content-delivery-gw.svc.ds.amcn.com/api/v2/content/amcn/%s/url/%s'
@@ -109,7 +106,6 @@ def _real_extract(self, url):
         media_url = update_url_query(media_url, query)
         formats, subtitles = self._extract_theplatform_smil(
             media_url, video_id)
-        self._sort_formats(formats)
 
         thumbnails = []
         thumbnail_urls = [properties.get('imageDesktop')]