projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49c5293
)
[extractor/bilibili] Fix path "/audio/auxxxxx" download return 403
author
lihan7
<lihan7@xiaomi.com>
Fri, 25 Mar 2022 07:46:28 +0000
(15:46 +0800)
committer
dirkf
<fieldhouse@gmx.net>
Thu, 31 Mar 2022 23:46:34 +0000
(
00:46
+0100)
youtube_dl/extractor/bilibili.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/bilibili.py
b/youtube_dl/extractor/bilibili.py
index bff6ea194d7ad9a39f7fc79cede427abdf3d8279..d42f0e98a4b2e76efb598225a0a0c63913555a6a 100644
(file)
--- a/
youtube_dl/extractor/bilibili.py
+++ b/
youtube_dl/extractor/bilibili.py
@@
-369,6
+369,11
@@
class BilibiliAudioIE(BilibiliAudioBaseIE):
'filesize': int_or_none(play_data.get('size')),
}]
+ for a_format in formats:
+ a_format.setdefault('http_headers', {}).update({
+ 'Referer': url,
+ })
+
song = self._call_api('song/info', au_id)
title = song['title']
statistic = song.get('statistic') or {}