mirror of
https://github.com/soimort/you-get.git
synced 2025-02-11 04:32:27 +03:00
[bilibili] fix 403 error when requesting interface.bilibili.com
interface.bilibili.com now requires referer to be set.
This commit is contained in:
parent
6e17b0c7f9
commit
8f124a6b78
@ -68,7 +68,7 @@ class Bilibili(VideoExtractor):
|
|||||||
chksum = hashlib.md5(bytes(params_str+self.SEC2, 'utf8')).hexdigest()
|
chksum = hashlib.md5(bytes(params_str+self.SEC2, 'utf8')).hexdigest()
|
||||||
api_url = self.bangumi_api_url + params_str + '&sign=' + chksum
|
api_url = self.bangumi_api_url + params_str + '&sign=' + chksum
|
||||||
|
|
||||||
xml_str = get_content(api_url)
|
xml_str = get_content(api_url, headers=dict(referer='http://www.bilibili.com'))
|
||||||
return xml_str
|
return xml_str
|
||||||
|
|
||||||
def parse_bili_xml(self, xml_str):
|
def parse_bili_xml(self, xml_str):
|
||||||
|
Loading…
Reference in New Issue
Block a user