From d6bbfd6b28263f00285ffa46bf0284c2cef58d6f Mon Sep 17 00:00:00 2001 From: thefatwhale <50515732+thefatwhale@users.noreply.github.com> Date: Sat, 18 Jul 2020 20:10:02 +0800 Subject: [PATCH] Update videostream_url.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 测试后发现加了referer后也出现了403 后来加入不为空的 UA之后发现可以正常在线播放/下载视频(感谢up主的api) --- video/videostream_url.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/video/videostream_url.md b/video/videostream_url.md index 76e3da1..9d99814 100644 --- a/video/videostream_url.md +++ b/video/videostream_url.md @@ -271,6 +271,8 @@ curl -G 'http://api.bilibili.com/x/player/playurl'\ 需要验证请求Header中`referer`为 `.bilibili.com`域名下(防盗链) +且`user-agent` 不为空 (否则会403) + **无referer或错误的情况会返回403 Forbidden**故无法获取 **以上述视频url为例:** @@ -281,4 +283,4 @@ wget 'http://upos-sz-mirrorhw.bilivideo.com/upgcxcode/08/62/171776208/171776208- -O 'Download_video.flv' ``` -响应正文将返回一个flv文件 \ No newline at end of file +响应正文将返回一个flv文件