mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 18:41:29 +00:00
[lifenews] Modernize
This commit is contained in:
parent
028a33d7f2
commit
062a3fdf36
|
@ -8,6 +8,7 @@
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
determine_ext,
|
determine_ext,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
|
remove_end,
|
||||||
unified_strdate,
|
unified_strdate,
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
)
|
)
|
||||||
|
@ -72,10 +73,9 @@ def _real_extract(self, url):
|
||||||
if not videos and not iframe_link:
|
if not videos and not iframe_link:
|
||||||
raise ExtractorError('No media links available for %s' % video_id)
|
raise ExtractorError('No media links available for %s' % video_id)
|
||||||
|
|
||||||
title = self._og_search_title(webpage)
|
title = remove_end(
|
||||||
TITLE_SUFFIX = ' - Первый по срочным новостям — LIFE | NEWS'
|
self._og_search_title(webpage),
|
||||||
if title.endswith(TITLE_SUFFIX):
|
' - Первый по срочным новостям — LIFE | NEWS')
|
||||||
title = title[:-len(TITLE_SUFFIX)]
|
|
||||||
|
|
||||||
description = self._og_search_description(webpage)
|
description = self._og_search_description(webpage)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue