aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-06-17 20:28:47 +0600
committerSergey M․ <dstftw@gmail.com>2015-06-17 20:28:47 +0600
commit062a3fdf36dee6515c9e3b103c39ac2691196e95 (patch)
tree3ede3085e0fb14705b24146dce9a7fc001b1a9e8
parent028a33d7f2a0bc028f533530d2722b57b31dabdc (diff)
[lifenews] Modernize
-rw-r--r--youtube_dl/extractor/lifenews.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube_dl/extractor/lifenews.py b/youtube_dl/extractor/lifenews.py
index 373122c93..1f07db3ec 100644
--- a/youtube_dl/extractor/lifenews.py
+++ b/youtube_dl/extractor/lifenews.py
@@ -8,6 +8,7 @@ from ..compat import compat_urlparse
from ..utils import (
determine_ext,
int_or_none,
+ remove_end,
unified_strdate,
ExtractorError,
)
@@ -72,10 +73,9 @@ class LifeNewsIE(InfoExtractor):
if not videos and not iframe_link:
raise ExtractorError('No media links available for %s' % video_id)
- title = self._og_search_title(webpage)
- TITLE_SUFFIX = ' - Первый по срочным новостям — LIFE | NEWS'
- if title.endswith(TITLE_SUFFIX):
- title = title[:-len(TITLE_SUFFIX)]
+ title = remove_end(
+ self._og_search_title(webpage),
+ ' - Первый по срочным новостям — LIFE | NEWS')
description = self._og_search_description(webpage)