]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/tvnet.py
[extractor] Deprecate `_sort_formats`
[yt-dlp.git] / yt_dlp / extractor / tvnet.py
index 4222ff9ee239fd2b55cc7771892ace9f3c59d43f..77426f7e6800847f00e1cf4dad20c4d68af1ddb4 100644 (file)
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 import re
 
 from .common import InfoExtractor
@@ -111,10 +108,7 @@ def _real_extract(self, url):
                 continue
             stream_urls.add(stream_url)
             formats.extend(self._extract_m3u8_formats(
-                stream_url, video_id, 'mp4',
-                entry_protocol='m3u8' if is_live else 'm3u8_native',
-                m3u8_id='hls', fatal=False))
-        self._sort_formats(formats)
+                stream_url, video_id, 'mp4', live=is_live, m3u8_id='hls', fatal=False))
 
         # better support for radio streams
         if title.startswith('VOV'):
@@ -130,9 +124,6 @@ def _real_extract(self, url):
                 r'data-image=(["\'])(?P<url>(?:https?:)?//.+?)\1', webpage,
                 'thumbnail', default=None, group='url'))
 
-        if is_live:
-            title = self._live_title(title)
-
         view_count = int_or_none(self._search_regex(
             r'(?s)<div[^>]+\bclass=["\'].*?view-count[^>]+>.*?(\d+).*?</div>',
             webpage, 'view count', default=None))