aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-08-07 15:59:05 +0700
committerSergey M․ <dstftw@gmail.com>2016-08-07 16:00:09 +0700
commita1aadd09a4721ffd4d782aae4ddeae2699ca17fa (patch)
treebfc608a3c4d48f8c1bab48c2266908e4bca3bc8e
parentb47a75017bc4b4739ccebb3e8bde0642981968b0 (diff)
[tnaflixnetworkbase] Improve title extraction
-rw-r--r--youtube_dl/extractor/tnaflix.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube_dl/extractor/tnaflix.py b/youtube_dl/extractor/tnaflix.py
index 74a0c8f17..7ddf77767 100644
--- a/youtube_dl/extractor/tnaflix.py
+++ b/youtube_dl/extractor/tnaflix.py
@@ -118,8 +118,12 @@ class TNAFlixNetworkBaseIE(InfoExtractor):
xpath_text(cfg_xml, './startThumb', 'thumbnail'), 'http:')
thumbnails = self._extract_thumbnails(cfg_xml)
- title = self._html_search_regex(
- self._TITLE_REGEX, webpage, 'title') if self._TITLE_REGEX else self._og_search_title(webpage)
+ title = None
+ if self._TITLE_REGEX:
+ title = self._html_search_regex(
+ self._TITLE_REGEX, webpage, 'title', default=None)
+ if not title:
+ title = self._og_search_title(webpage)
age_limit = self._rta_search(webpage) or 18