projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
028a33d
)
[lifenews] Modernize
author
Sergey M․
<dstftw@gmail.com>
Wed, 17 Jun 2015 14:28:47 +0000
(20:28 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Wed, 17 Jun 2015 14:28:47 +0000
(20:28 +0600)
youtube_dl/extractor/lifenews.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/lifenews.py
b/youtube_dl/extractor/lifenews.py
index 373122c93712fb88d490883267f25d398e0f9428..1f07db3ec745f5ffcbbe3409428f08d7001ed492 100644
(file)
--- 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,
from ..utils import (
determine_ext,
int_or_none,
+ remove_end,
unified_strdate,
ExtractorError,
)
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)
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)
description = self._og_search_description(webpage)