mirror of
https://github.com/soimort/you-get.git
synced 2025-01-24 22:15:03 +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.url = 'http://www.bilibili.com/video/av{}/index_{}.html'.format(aid, page)
|
||||||
self.referer = self.url
|
self.referer = self.url
|
||||||
self.page = get_content(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 'subtitle' in kwargs:
|
if m is not None:
|
||||||
subtitle = kwargs['subtitle']
|
self.title = m.group(1)
|
||||||
self.title = '{} {}'.format(self.title, subtitle)
|
if self.title is None:
|
||||||
except Exception:
|
m = re.search(r'<meta property="og:title" content="([^"]+)">', self.page)
|
||||||
pass
|
if m is not None:
|
||||||
|
self.title = m.group(1)
|
||||||
|
if 'subtitle' in kwargs:
|
||||||
|
subtitle = kwargs['subtitle']
|
||||||
|
self.title = '{} {}'.format(self.title, subtitle)
|
||||||
|
|
||||||
if 'bangumi.bilibili.com/movie' in self.url:
|
if 'bangumi.bilibili.com/movie' in self.url:
|
||||||
self.movie_entry(**kwargs)
|
self.movie_entry(**kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user