[Bilibili] Fix title extraction (#1716)

Closes #1714
Authored by: u-spec-png
This commit is contained in:
u-spec-png 2021-11-30 16:18:46 +00:00 committed by GitHub
parent 73f035e1fe
commit ac0efabf12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -346,7 +346,8 @@ class BiliBiliIE(InfoExtractor):
def _extract_anthology_entries(self, bv_id, video_id, webpage):
title = self._html_search_regex(
(r'<h1[^>]+\btitle=(["\'])(?P<title>(?:(?!\1).)+)\1',
r'(?s)<h1[^>]*>(?P<title>.+?)</h1>'), webpage, 'title',
r'(?s)<h1[^>]*>(?P<title>.+?)</h1>',
r'<title>(?P<title>.+?)</title>'), webpage, 'title',
group='title')
json_data = self._download_json(
f'https://api.bilibili.com/x/player/pagelist?bvid={bv_id}&jsonp=jsonp',