mirror of
https://github.com/soimort/you-get.git
synced 2025-01-24 14:05:01 +03:00
Merge branch 'pr' of https://github.com/ayanamist/you-get into ayanamist-pr
This commit is contained in:
commit
907600c2de
@ -123,13 +123,17 @@ class Bilibili(VideoExtractor):
|
||||
self.url = 'http://www.bilibili.com/video/av{}/index_{}.html'.format(aid, page)
|
||||
self.referer = self.url
|
||||
self.page = get_content(self.url)
|
||||
try:
|
||||
self.title = re.search(r'<h1\s*title="([^"]+)"', self.page).group(1)
|
||||
|
||||
m = re.search(r'<h1\s*title="([^"]+)"', self.page)
|
||||
if m is not None:
|
||||
self.title = m.group(1)
|
||||
if self.title is None:
|
||||
m = re.search(r'<meta property="og:title" content="([^"]+)">', self.page)
|
||||
if m is not None:
|
||||
self.title = m.group(1)
|
||||
if 'subtitle' in kwargs:
|
||||
subtitle = kwargs['subtitle']
|
||||
self.title = '{} {}'.format(self.title, subtitle)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if 'bangumi.bilibili.com/movie' in self.url:
|
||||
self.movie_entry(**kwargs)
|
||||
|
Loading…
Reference in New Issue
Block a user