]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/livestream.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / livestream.py
index 4b90c22c56646588c8cbe8ed12bdc5d382b22a46..d883eafcff3dbcba1c04ee332739b9d99974e6f3 100644 (file)
@@ -23,6 +23,8 @@
 class LivestreamIE(InfoExtractor):
     IE_NAME = 'livestream'
     _VALID_URL = r'https?://(?:new\.)?livestream\.com/(?:accounts/(?P<account_id>\d+)|(?P<account_name>[^/]+))/(?:events/(?P<event_id>\d+)|(?P<event_name>[^/]+))(?:/videos/(?P<id>\d+))?'
+    _EMBED_REGEX = [r'<iframe[^>]+src="(?P<url>https?://(?:new\.)?livestream\.com/[^"]+/player[^"]+)"']
+
     _TESTS = [{
         'url': 'http://new.livestream.com/CoheedandCambria/WebsterHall/videos/4719370',
         'md5': '53274c76ba7754fb0e8d072716f2292b',
@@ -124,7 +126,6 @@ def _extract_video_info(self, video_data):
         if f4m_url:
             formats.extend(self._extract_f4m_formats(
                 f4m_url, video_id, f4m_id='hds', fatal=False))
-        self._sort_formats(formats)
 
         comments = [{
             'author_id': comment.get('author_id'),
@@ -169,7 +170,6 @@ def _extract_stream_info(self, stream_info):
                 'url': rtsp_url,
                 'format_id': 'rtsp',
             })
-        self._sort_formats(formats)
 
         return {
             'id': broadcast_id,
@@ -298,7 +298,6 @@ def _extract_video_formats(self, video_data, video_id):
                 'format_id': 'rtsp',
             })
 
-        self._sort_formats(formats)
         return formats
 
     def _extract_folder(self, url, folder_id):