]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/tv24ua.py
[ie/mlbtv] Fix extraction (#10296)
[yt-dlp.git] / yt_dlp / extractor / tv24ua.py
index 553a70b6b26145b9e0664637507bc952735d92c1..2787de4da0146a162a55213411a54a889381b688 100644 (file)
@@ -1,12 +1,7 @@
 import re
 
 from .common import InfoExtractor
-from ..utils import (
-    determine_ext,
-    js_to_json,
-    mimetype2ext,
-    traverse_obj,
-)
+from ..utils import determine_ext, js_to_json, mimetype2ext, traverse_obj
 
 
 class TV24UAVideoIE(InfoExtractor):
@@ -20,7 +15,7 @@ class TV24UAVideoIE(InfoExtractor):
             'ext': 'mp4',
             'title': 'У Харкові ворожа ракета прилетіла в будинок, де слухали пісні про "офіцерів-росіян"',
             'thumbnail': r're:^https?://.*\.jpe?g',
-        }
+        },
     }, {
         'url': 'https://24tv.ua/news/showPlayer.do?videoUrl=2022/07/2074790&objectId=2074790&w=640&h=360',
         'only_matching': True,
@@ -37,7 +32,7 @@ class TV24UAVideoIE(InfoExtractor):
                 'ext': 'mp4',
                 'title': 'Росіяни руйнують Бородянку на Київщині та стріляють з літаків по мешканцях: шокуючі фото',
                 'thumbnail': r're:^https?://.*\.jpe?g',
-            }
+            },
         },
         {
             'url': 'https://24tv.ua/vipalyuyut-nashi-mista-sela-dsns-pokazali-motoroshni-naslidki_n1883966',
@@ -48,7 +43,7 @@ class TV24UAVideoIE(InfoExtractor):
                 'thumbnail': r're:^https?://.*\.jpe?g',
             },
             'params': {'allowed_extractors': ['Generic', '24tv.ua']},
-        }
+        },
     ]
 
     def _real_extract(self, url):
@@ -73,12 +68,11 @@ def _real_extract(self, url):
             self._search_json(
                 r'var\s*vPlayConfig\s*=\s*', webpage, 'thumbnail',
                 video_id, default=None, transform_source=js_to_json), 'poster')
-        self._sort_formats(formats)
         return {
             'id': video_id,
             'formats': formats,
             'subtitles': subtitles,
             'thumbnail': thumbnail or self._og_search_thumbnail(webpage),
-            'title': self._html_extract_title(webpage) or self._og_search_title(webpage),
+            'title': self._generic_title('', webpage),
             'description': self._og_search_description(webpage, default=None),
         }