mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
fix: bilibili space video return 403 error
This commit is contained in:
parent
63fd9716a8
commit
f884a1b275
@ -139,7 +139,7 @@ class Bilibili(VideoExtractor):
|
|||||||
self.stream_qualities = {s['quality']: s for s in self.stream_types}
|
self.stream_qualities = {s['quality']: s for s in self.stream_types}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
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, cookie='CURRENT_FNVAL=16'))
|
||||||
except:
|
except:
|
||||||
html_content = '' # live always returns 400 (why?)
|
html_content = '' # live always returns 400 (why?)
|
||||||
#self.title = match1(html_content,
|
#self.title = match1(html_content,
|
||||||
@ -582,7 +582,7 @@ class Bilibili(VideoExtractor):
|
|||||||
self.url = url
|
self.url = url
|
||||||
kwargs['playlist'] = True
|
kwargs['playlist'] = True
|
||||||
|
|
||||||
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, cookie='CURRENT_FNVAL=16'))
|
||||||
|
|
||||||
# sort it out
|
# sort it out
|
||||||
if re.match(r'https?://(www\.)?bilibili\.com/bangumi/play/ep(\d+)', self.url):
|
if re.match(r'https?://(www\.)?bilibili\.com/bangumi/play/ep(\d+)', self.url):
|
||||||
|
Loading…
Reference in New Issue
Block a user