1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-12-31 00:42:58 +08:00

[tnaflixnetworkbase] Improve title extraction

This commit is contained in:
Sergey M․ 2016-08-07 15:59:05 +07:00
parent b47a75017b
commit a1aadd09a4
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -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