1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-11 09:27:46 +08:00

fix search_regex for title and player parameters in bilibli.py

This commit is contained in:
balibell 2018-03-13 18:24:41 +08:00
parent 08250b69c2
commit c5953ac41d

View File

@ -93,7 +93,7 @@ class BiliBiliIE(InfoExtractor):
if 'anime/' not in url:
cid = compat_parse_qs(self._search_regex(
[r'EmbedPlayer\([^)]+,\s*"([^"]+)"\)',
[r'EmbedPlayer\([^)]+,[^)]+,\s*\\"([^"]+)\\"\)',
r'<iframe[^>]+src="https://secure\.bilibili\.com/secure,([^"]+)"'],
webpage, 'player parameters'))['cid'][0]
else:
@ -157,7 +157,7 @@ class BiliBiliIE(InfoExtractor):
'formats': formats,
})
title = self._html_search_regex('<h1[^>]*>([^<]+)</h1>', webpage, 'title')
title = self._html_search_regex('<title[^>]*>([^<]+)</title>', webpage, 'title')
description = self._html_search_meta('description', webpage)
timestamp = unified_timestamp(self._html_search_regex(
r'<time[^>]+datetime="([^"]+)"', webpage, 'upload time', default=None))