mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-15 19:16:46 +01:00
[cleanup] Use _html_extract_title
This commit is contained in:
parent
85e801a9db
commit
04f3fd2c89
38 changed files with 51 additions and 80 deletions
|
|
@ -309,7 +309,9 @@ class NhkForSchoolProgramListIE(InfoExtractor):
|
|||
|
||||
webpage = self._download_webpage(f'https://www.nhk.or.jp/school/{program_id}/', program_id)
|
||||
|
||||
title = self._og_search_title(webpage, fatal=False) or self._html_extract_title(webpage, fatal=False) or self._html_search_regex(r'<h3>([^<]+?)とは?\s*</h3>', webpage, 'title', fatal=False)
|
||||
title = (self._og_search_title(webpage)
|
||||
or self._html_extract_title(webpage)
|
||||
or self._html_search_regex(r'<h3>([^<]+?)とは?\s*</h3>', webpage, 'title', fatal=False))
|
||||
title = re.sub(r'\s*\|\s*NHK\s+for\s+School\s*$', '', title) if title else None
|
||||
description = self._html_search_regex(
|
||||
r'(?s)<div\s+class="programDetail\s*">\s*<p>[^<]+</p>',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue