mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
[bilibili] redirect /s/ URLs
This commit is contained in:
parent
ef9ff72183
commit
1c841f7e8c
@ -162,6 +162,11 @@ class Bilibili(VideoExtractor):
|
|||||||
self.url = 'https://www.bilibili.com/bangumi/play/ep%s' % ep_id
|
self.url = 'https://www.bilibili.com/bangumi/play/ep%s' % ep_id
|
||||||
html_content = get_content(self.url, headers=self.bilibili_headers(referer=self.url))
|
html_content = get_content(self.url, headers=self.bilibili_headers(referer=self.url))
|
||||||
|
|
||||||
|
# redirect: s
|
||||||
|
elif re.match(r'https?://(www\.)?bilibili\.com/s/(.+)', self.url):
|
||||||
|
self.url = 'https://www.bilibili.com/%s' % match1(self.url, r'/s/(.+)')
|
||||||
|
html_content = get_content(self.url, headers=self.bilibili_headers())
|
||||||
|
|
||||||
# sort it out
|
# sort it out
|
||||||
if re.match(r'https?://(www\.)?bilibili\.com/audio/au(\d+)', self.url):
|
if re.match(r'https?://(www\.)?bilibili\.com/audio/au(\d+)', self.url):
|
||||||
sort = 'audio'
|
sort = 'audio'
|
||||||
|
Loading…
Reference in New Issue
Block a user