Update to ytdl-commit-3be0980

3be098010f
This commit is contained in:
pukkandan
2021-03-15 04:52:06 +05:30
parent 7275535116
commit 10db0d2f57
17 changed files with 356 additions and 253 deletions

View File

@@ -138,11 +138,6 @@ class BiliBiliIE(InfoExtractor):
anime_id = mobj.group('anime_id')
page_id = mobj.group('page')
webpage = self._download_webpage(url, video_id)
headers = {
'Referer': url,
'Accept': '*/*'
}
headers.update(self.geo_verification_headers())
if 'anime/' not in url:
cid = self._search_regex(
@@ -160,8 +155,12 @@ class BiliBiliIE(InfoExtractor):
if 'no_bangumi_tip' not in smuggled_data:
self.to_screen('Downloading episode %s. To download all videos in anime %s, re-run yt-dlp with %s' % (
video_id, anime_id, compat_urlparse.urljoin(url, '//bangumi.bilibili.com/anime/%s' % anime_id)))
headers = {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Referer': url
}
headers.update(self.geo_verification_headers())
headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
js = self._download_json(
'http://bangumi.bilibili.com/web_api/get_source', video_id,
data=urlencode_postdata({'episode_id': video_id}),
@@ -170,6 +169,12 @@ class BiliBiliIE(InfoExtractor):
self._report_error(js)
cid = js['result']['cid']
headers = {
'Accept': 'application/json',
'Referer': url
}
headers.update(self.geo_verification_headers())
entries = []
RENDITIONS = ('qn=80&quality=80&type=', 'quality=2&type=mp4')