]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[RTLnowIE] Clean video title
authorrzhxeo <rzhxeo@users.noreply.github.com>
Fri, 27 Sep 2013 04:00:37 +0000 (06:00 +0200)
committerrzhxeo <rzhxeo@users.noreply.github.com>
Fri, 27 Sep 2013 04:00:37 +0000 (06:00 +0200)
The title of some videos has the following format:
Series - Episode | Series online schauen bei ... NOW

youtube_dl/extractor/rtlnow.py

index 7bb236c2b9fe02e998a9cdee38c640110f22b19c..3783aa5387848d2476365716588ae986fbdb2532 100644 (file)
@@ -79,7 +79,7 @@ class RTLnowIE(InfoExtractor):
             msg = clean_html(note_m.group(1))
             raise ExtractorError(msg)
 
-        video_title = self._html_search_regex(r'<title>(?P<title>[^<]+)</title>',
+        video_title = self._html_search_regex(r'<title>(?P<title>[^<]+?)( \| [^<]*)?</title>',
             webpage, u'title')
         playerdata_url = self._html_search_regex(r'\'playerdata\': \'(?P<playerdata_url>[^\']+)\'',
             webpage, u'playerdata_url')