]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/cspan.py
[ie/orf:on] Improve extraction (#9677)
[yt-dlp.git] / yt_dlp / extractor / cspan.py
index f51159bbe68c9de6ae7c4e14129c8185f73c6e5c..0075680e8f505e85478ff6d93a1dad629f1f1d31 100644 (file)
@@ -1,5 +1,3 @@
-from __future__ import unicode_literals
-
 import re
 
 from .common import InfoExtractor
@@ -165,7 +163,7 @@ def add_referer(formats):
                 video_id = m.group('id')
                 video_type = 'program' if m.group('type') == 'prog' else 'clip'
             else:
-                senate_isvp_url = SenateISVPIE._search_iframe_url(webpage)
+                senate_isvp_url = SenateISVPIE._extract_url(webpage)
                 if senate_isvp_url:
                     title = self._og_search_title(webpage)
                     surl = smuggle_url(senate_isvp_url, {'force_title': title})
@@ -220,7 +218,6 @@ def get_text_attr(d, attr):
                     path, video_id, 'mp4', entry_protocol='m3u8_native',
                     m3u8_id='hls') if determine_ext(path) == 'm3u8' else [{'url': path, }]
             add_referer(formats)
-            self._sort_formats(formats)
             entries.append({
                 'id': '%s_%d' % (video_id, partnum + 1),
                 'title': (
@@ -277,8 +274,7 @@ def _real_extract(self, url):
             self._search_regex(r'jwsetup\s*=\s*({(?:.|\n)[^;]+});', webpage, 'player config'),
             video_id, transform_source=js_to_json)
 
-        title = (self._og_search_title(webpage, default=None)
-                 or self._html_extract_title(webpage, 'video title'))
+        title = self._generic_title('', webpage)
         description = (self._og_search_description(webpage, default=None)
                        or self._html_search_meta('description', webpage, 'description', default=None))