projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b47a750
)
[tnaflixnetworkbase] Improve title extraction
author
Sergey M․
<dstftw@gmail.com>
Sun, 7 Aug 2016 08:59:05 +0000
(15:59 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 7 Aug 2016 09:00:09 +0000
(16:00 +0700)
youtube_dl/extractor/tnaflix.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/tnaflix.py
b/youtube_dl/extractor/tnaflix.py
index 74a0c8f172761290abe54a83b281e770dfc6d926..7ddf77767d804faff4097d85d796760bc4473b77 100644
(file)
--- 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)
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
age_limit = self._rta_search(webpage) or 18