]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/openrec.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / openrec.py
index 5eb1cdbad5bc4f397195aa2cd96b5fed23449eba..86dc9bb898cf1f7867cba477a49562767e247044 100644 (file)
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 from .common import InfoExtractor
 from ..utils import (
     ExtractorError,
@@ -38,8 +35,8 @@ def _extract_movie(self, webpage, video_id, name, is_live):
             raise ExtractorError(f'Failed to extract {name} info')
 
         formats = list(self._expand_media(video_id, get_first(movie_stores, 'media')))
-        if not formats and is_live:
-            # archived livestreams
+        if not formats:
+            # archived livestreams or subscriber-only videos
             cookies = self._get_cookies('https://www.openrec.tv/')
             detail = self._download_json(
                 f'https://apiv5.openrec.tv/api/v5/movies/{video_id}/detail', video_id,
@@ -53,8 +50,6 @@ def _extract_movie(self, webpage, video_id, name, is_live):
             formats = list(self._expand_media(video_id, new_media))
             is_live = False
 
-        self._sort_formats(formats)
-
         return {
             'id': video_id,
             'title': get_first(movie_stores, 'title'),
@@ -116,7 +111,6 @@ def _real_extract(self, url):
 
         formats = self._extract_m3u8_formats(
             capture_data.get('source'), video_id, ext='mp4')
-        self._sort_formats(formats)
 
         return {
             'id': video_id,