Skip to content

Commit

Permalink
[extractor/bilibili] Fix path "/audio/auxxxxx" download return 403
Browse files Browse the repository at this point in the history
  • Loading branch information
lihan7 authored and dirkf committed Jun 27, 2022
1 parent c9f44c8 commit 65f19db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions youtube_dl/extractor/bilibili.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,11 @@ def _real_extract(self, url):
'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 {}
Expand Down

0 comments on commit 65f19db

Please sign in to comment.