关于一些改进 #260
an-Underpriviliged-ZJUer
started this conversation in
General
关于一些改进
#260
Replies: 1 comment
-
所有图片均来自于B站;封面有两种,一个是cover.jpg,另一个与视频同名。普通视频的cover.jpg就是B站上显示的封面,与视频同名的封面一般是该视频的第一帧;番剧电影电视剧等的cover.jpg是详情页显示的封面,与视频同名的封面是每集的封面。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
希望能增加一个功能,批量下载一个up列表的视频
比如一个本地记录up UID的txt
另外,发现现在下载的并不是视频封面,我估计开发者只是纯纯截了一张视频的图
(这样一来我反而有点不想要下载姬的封面了,注意毕竟有的视频封面其实根本可以不是视频中的
附上我写的爬虫里下封面用的url (python
def Download(): page=1 url = (f'https://api.bilibili.com/x/space/arc/search?mid={UserUID}&ps=30&tid=0&pn={page}&keyword=&order=pubdate&jsonp=jsonp') res = requests.get(url, headers=MyUtils.headers) if page*30 > res.json()['data']['page']['count']: return page += 1 for video in res.json()['data']['list']['vlist']: aid = video['aid'] bvid = video['bvid'] UserID=MyUtils.MyName(video["author"]) picname = f'AV{aid}{bvid}'+MyUtils.MyName(video['description']) if (os.path.exists(f'./bili/cover/{UserID}/{picname}.jpg')): continue MyUtils.MyRequestDownload(f'./bili/cover/{UserID}/{picname}.jpg', 'wb', video['pic']) print(f'视频封面下载完成{picname}')
ps好像是一页的视频数,默认30一般不能改,pn应该是从1开始~
Beta Was this translation helpful? Give feedback.
All reactions