Comments (7)
哈哈的确,直接用这个API很方便呀~
但是怎么获取不同画质的视频下载链接呢,还望指点,默认就直接是最高质量的 @daofeng2015
from bilibili_video_download.
https://api.bilibili.com/x/player/playurl?avid=44743619&cid=78328965&qn=80&otype=json
qn参数就是清晰度
可选值:
80 高清1080P
64 高清720P
32 清晰480P
16 流畅360P
上面是普通会员可选的清晰度。然后,大会员720+好像是72,1080+ 忘了。
from bilibili_video_download.
谢谢老哥啦~那我就用这个接口写个新代码了
from bilibili_video_download.
哈哈,不好意思大家~
今早有大佬提醒我了: 不管是什么视频 下载之后都是最低清晰度 哪怕选择了80也是只有480p的分辨率
我试了一下还真的是这样, 昨天都没注意到呢
所以我还是改回原来加密接口的版本吧, 可以下720,1080的视频
最后, 哈哈还是要感谢两位大大
from bilibili_video_download.
请求的时候header要加上这个:
headers: {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:56.0) Gecko/20100101 Firefox/56.0',
'Host': 'api.bilibili.com',
'Cookie': 'SESSDATA=bd125cdd%2C1554519358%2C6d4df231'
}
SESSDATA从登录的cookie里面取,你试试。我以前就是这么干的。但是不知道现在还可以吗。
from bilibili_video_download.
嗯 加上cookie的确可以获取到720p及以上的清晰度了;
谢谢大佬指点! @blogwy
from bilibili_video_download.
需要登录的.传入cookie就行了,b站默认游客只能获取到480p,登录720和1080,大会员可以720p/60,1080p/60
from bilibili_video_download.
Related Issues (20)
- AttributeError: 'NoneType' object has no attribute 'group' HOT 2
- imageio.ffmpeg.download() has been deprecated
- 清晰度解析问题 HOT 2
- 闪退问题
- 能下4K的视频吗
- 有关ffmpeg的安装问题,是否可以手动安装? HOT 3
- Fgh
- 针对BV号的问题 HOT 4
- 有人知道怎么请求出1080p的mp4地址吗? HOT 15
- 请问下载时可以直接下载mp4格式吗? HOT 3
- 高清1080P mp4 在线解析下载 无需登录 http://bilibili.syyhc.com HOT 12
- - HOT 5
- [bug匯報]對於沒有合法title的視頻, 程序會在combine_video時出錯 HOT 1
- Error while fetching file: <urlopen error [Errno 111] Connection refused>. HOT 1
- 東鄉1
- q
- 1
- File "bilibili_video_download-GUI.py", line 270, in <module>
- ImportError: cannot import name 'Mapping' from 'collections' HOT 3
- 建议:GitHub仓库中图片无法展示问题处理 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bilibili_video_download.