sodaling / fastestbilibilidownloader Goto Github PK
View Code? Open in Web Editor NEWB站视频极速批量下载器|The fastest Bilibili video downloader
B站视频极速批量下载器|The fastest Bilibili video downloader
aid:28899117
运行程序后, 会有8个线程下载, 但磁盘上只有1个文件, 而且大小也不正确, 不能正常播放视频。
A:\FastestBilibiliDownloader-master\cmd>go run start-concurrent-engine.go
Please enter your id type(`aid` or `upid`)
aid
Please enter your id
28899117
2020/03/27 23:58:22 Start working.
2020/03/27 23:58:22 28899117:1.flv is downloading.
2020/03/27 23:58:22 28899117:1.flv is downloading.
2020/03/27 23:58:22 28899117:1.flv is downloading.
2020/03/27 23:58:22 28899117:1.flv is downloading.
2020/03/27 23:58:22 28899117:1.flv is downloading.
2020/03/27 23:58:22 28899117:1.flv is downloading.
2020/03/27 23:58:22 28899117:1.flv is downloading.
2020/03/27 23:58:22 28899117:1.flv is downloading.
2020/03/28 00:00:02 28899117:1.flv has finished.
2020/03/28 00:00:02 28899117 download completed.Start merging videos now.
2020/03/28 00:00:03 Video 28899117 merge is complete.
2020/03/28 00:00:13 28899117:1.flv has finished.
2020/03/28 00:00:25 28899117:1.flv has finished.
2020/03/28 00:00:33 28899117:1.flv has finished.
2020/03/28 00:00:34 28899117:1.flv has finished.
2020/03/28 00:00:46 28899117:1.flv has finished.
2020/03/28 00:00:54 28899117:1.flv has finished.
2020/03/28 00:01:29 28899117:1.flv has finished.
2020/03/28 00:01:29 All work has done
is downloading.
panic: mkdir /media/FastestBilibiliDownloader/download/501536997_【阿梓】暗恋梓宝?那可挺令人恶心的,那可挺令人作呕的🤮: invalid argument
goroutine 35 [running]:
simple-golang-crawler/tool.GetAidFileDownloadDir(0x1de4d8e5, 0xc00013b12a, 0x58, 0x0, 0x0)
/media/baka/My Book/FastestBilibiliDownloader/tool/path.go:29 +0x467
simple-golang-crawler/fetcher.GenVideoFetcher.func1(0xc0005be033, 0x1fe, 0x0, 0x0, 0x0, 0x0, 0x0)
/media/baka/My Book/FastestBilibiliDownloader/fetcher/downloader.go:52 +0x9b3
simple-golang-crawler/engine.work(0xc00027a5a0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/media/baka/My Book/FastestBilibiliDownloader/engine/concurrent.go:105 +0x57
simple-golang-crawler/engine.CreateWorker.func1(0x7fad6acd2090, 0xc000082d30, 0xc000072780, 0xc000072180)
/media/baka/My Book/FastestBilibiliDownloader/engine/concurrent.go:93 +0xa3
created by simple-golang-crawler/engine.CreateWorker
/media/baka/My Book/FastestBilibiliDownloader/engine/concurrent.go:89 +0x5d
exit status 2
Ubuntu下,这种标题带奇奇怪怪emoji的会导致在下载up主所有视频的时候脚本直接坏掉,能否过滤掉标题中不支持的emoji部分建文件夹。或者还有一种方法就是把这种类型的视频像下载aid单视频那种只保留aid号建立文件夹。还有就是可不可以增加个监测跳过已经下载过的视频?视频太多又每天投稿的号重开很痛苦,非常感谢。
A:\FastestBilibiliDownloader-master\cmd>go run start-concurrent-engine.go Can't locate your ffmeg.The video your download can't be merged Please enter your id type(
aidor
upid`)
aid
Please enter your id
92756064
2020/03/14 20:52:47 Start working.
2020/03/14 20:52:47 Item Saver:got item #0: &{0xc000070300}
panic: mkdir A:\FastestBilibiliDownloader-master\cmd/download/92756064:92756064: The directory name is invalid.
goroutine 22 [running]:
simple-golang-crawler/tool.GetAidFileDownloadDir(0x5875860, 0xc000011c78, 0x8, 0x0, 0x0)
A:/FastestBilibiliDownloader-master/tool/path.go:18 +0x218
simple-golang-crawler/fetcher.GenVideoFetcher.func1(0xc00022c036, 0xe9, 0x0, 0x0, 0x0, 0x0, 0x0)
A:/FastestBilibiliDownloader-master/fetcher/downloader.go:52 +0x9a9
simple-golang-crawler/engine.work(0xc0002041a0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
A:/FastestBilibiliDownloader-master/engine/concurrent.go:105 +0x5e
simple-golang-crawler/engine.CreateWorker.func1(0xd94008, 0xc000064d10, 0xc000090240, 0xc000090000)
A:/FastestBilibiliDownloader-master/engine/concurrent.go:93 +0xaa
created by simple-golang-crawler/engine.CreateWorker
A:/FastestBilibiliDownloader-master/engine/concurrent.go:89 +0x64
exit status 2
`
不知道是不是要创建“92756064:92756064”这个目录, 冒号(:)在Win下是不允许作为文件名的。
我已经手动创建了”A:\FastestBilibiliDownloader-master\cmd\download\92756064“这个目录, 还是不能运行程序。
请输入想要下载的视频网址/up主个人主页网址: https://space.bilibili.com/626863/
2023/01/21 22:38:48 开始下载...
panic: runtime error: integer divide by zero
goroutine 9 [running]:
simple-golang-crawler/parser.getNewBilibiliUpSpaceReqList({0x0, {0x0, 0x0}, {0x0, 0x0}, 0x0, 0x0}, 0xc00009a000?)
FastestBilibiliDownloader/parser/aid.go:64 +0x689
simple-golang-crawler/parser.UpSpaceParseFun({0xc000228000?, 0x6a?, 0x0?}, {0xc000200050?, 0xc000200000?})
FastestBilibiliDownloader/parser/aid.go:31 +0x1e5
simple-golang-crawler/engine.work(0xc00002e2e0)
FastestBilibiliDownloader/engine/concurrent.go:109 +0xb1
simple-golang-crawler/engine.CreateWorker.func1()
FastestBilibiliDownloader/engine/concurrent.go:93 +0x99
created by simple-golang-crawler/engine.CreateWorker
FastestBilibiliDownloader/engine/concurrent.go:89 +0xaa
go version go1.19.5 linux/amd64
视频合集下载命名能不能按P命名哦,下载的文件全是1,2,3,这种有点不好找视频。。。
能否加入bid转aid的功能?类似于这个网站:
https://bv2av.com/
下载分P视频可以自动命名原P的标题嘛?
不知道如何获得aid,无法下载视频
期望支持cookie或者登陆,方便下载最清晰的文件
MacOS : 10.15.3
Docker version 19.03.5, build 633a0ea
➜ FastestBilibiliDownloader git:(master) make run
docker run -it -v /Users/deon/FastestBilibiliDownloader/download:/download crawler
Unable to find image 'crawler:latest' locally
docker: Error response from daemon: pull access denied for crawler, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
make: *** [run] Error 125
➜ FastestBilibiliDownloader git:(master) docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
downloader latest 0c02c2471788 35 seconds ago 63.9MB
5ee2db5b115b About a minute ago 459MB
控制台输出使用不同的颜色,或Xorg日志那样的标签,以区分正常进度、错误信息等。
请输入想要下载的视频网址/up主个人主页网址: https://space.bilibili.com/8203563/
2023/08/18 13:31:58 开始下载...
panic: runtime error: integer divide by zero
goroutine 8 [running]:
simple-golang-crawler/parser.getNewBilibiliUpSpaceReqList({0x0, {0x0, 0x0}, {0x0, 0x0}, 0x0, 0x0}, 0xc000358000?)
C:/Users/Mo2022/Documents/golangProject/FastestBilibiliDownloader-master/parser/aid.go:64 +0x5ac
simple-golang-crawler/parser.UpSpaceParseFun({0xc0001e8000?, 0x6b?, 0x0?}, {0xc00007a2f8?, 0x100000000000000?})
C:/Users/Mo2022/Documents/golangProject/FastestBilibiliDownloader-master/parser/aid.go:31 +0x1cf
simple-golang-crawler/engine.work(0xc0000686c0)
C:/Users/Mo2022/Documents/golangProject/FastestBilibiliDownloader-master/engine/concurrent.go:109 +0x9e
simple-golang-crawler/engine.CreateWorker.func1()
C:/Users/Mo2022/Documents/golangProject/FastestBilibiliDownloader-master/engine/concurrent.go:93 +0x79
created by simple-golang-crawler/engine.CreateWorker in goroutine 1
C:/Users/Mo2022/Documents/golangProject/FastestBilibiliDownloader-master/engine/concurrent.go:89 +0x94
aid, _ = strconv.ParseInt(strings.TrimPrefix(params[1], "av"), 10, 64)
如何提高下载的视频分辨率
Please enter your id type(aid
or upid
)
upid
Please enter your id
433384217
2020/06/05 03:45:28 Start working.
2020/06/05 03:45:28 fetch err while request :https://api.bilibili.com/x/space/arc/search?mid=433384217&ps=30&tid=0&pn=1&keyword=&order=pubdate&jsonp=jsonp,and the err is Get https://api.bilibili.com/x/space/arc/search?mid=433384217&ps=30&tid=0&pn=1&keyword=&order=pubdate&jsonp=jsonp: x509: certificate signed by unknown authority
Makefile:9: recipe for target 'run' failed
make: *** [run] Error 1
使用的是docker,正常跑起来了,也显示视频都下载完毕,但是为什么无论download和output路径下都没东西呢?
运行时打印如下:
请输入想要下载的视频网址/up主个人主页网址: https://www.bilibili.com/video/BV19B4y1374d
2022/09/03 17:26:14 开始下载...
即将开始下载: 又 甘 又 刻,叮叮当当舞! ❤️ 【咬人猫】
2022/09/03 17:26:15 正在下载:又 甘 又 刻,叮叮当当舞! ❤️ 【咬人猫】\1_1.flv
2022/09/03 17:26:22 下载完成:又 甘 又 刻,叮叮当当舞! ❤️ 【咬人猫】\1_1.flv
2022/09/03 17:26:22 所有视频均已下载完成。按 Ctrl+C 来退出程序。
问题: 在用docker执行的时候,发现都是在前台执行,并且在执行中途会出现一下报错!
Socket error Event: 32 Error: 10053.
Connection closing...Socket close.
Connection closed by foreign host.
Disconnected from remote host(M01) at 18:57:32.
Type `help' to learn how to use Xshell prompt.
建议:
能否更改为读取配置文件的方式,将需要下载的aid 或者 upid 直接写入配置文件.
并且可以让docker在后台运行.
最好能够排序,多aid下载.
嗯, 我又来了。 症状与之前一样, 没有生成output.mp4
你在非win系统下试试吧。
BTW: 给一些可能有用的信息
我执行了2次, 第一次的log如下
PS A:\FastestBilibiliDownloader-master\cmd> go run .\start-concurrent-engine.go
Please enter your id type(`aid` or `upid`)
aid
Please enter your id
71590444
2020/04/02 22:30:04 Start working.
2020/04/02 22:30:05 71590444:4_1.flv is downloading.
2020/04/02 22:30:05 71590444:1_1.flv is downloading.
2020/04/02 22:30:05 71590444:2_1.flv is downloading.
2020/04/02 22:30:05 71590444:5_1.flv is downloading.
2020/04/02 22:31:54 71590444:3_1.flv has finished.
2020/04/02 22:32:01 71590444:1_1.flv has finished.
2020/04/02 22:33:57 71590444:2_1.flv has finished.
2020/04/02 22:36:30 71590444:6_1.flv has finished.
2020/04/02 22:37:04 71590444:4_1.flv has finished.
2020/04/02 22:42:49 71590444:5_1.flv has finished.
2020/04/02 22:42:49 71590444 download completed.Start merging videos now.
2020/04/02 22:42:49 71590444 download completed.Start merging videos now.
2020/04/02 22:42:49 71590444 download completed.Start merging videos now.
2020/04/02 22:42:49 71590444 download completed.Start merging videos now.
2020/04/02 22:42:49 71590444 download completed.Start merging videos now.
2020/04/02 22:42:49 71590444 download completed.Start merging videos now.
2020/04/02 22:42:49 Video 71590444 merge is complete.
2020/04/02 22:42:49 All work has done
运行结果是:没有output.mp4, 下载的flv文件也都被删除了。
第二次,把删除flv的代码屏蔽掉, 运行log如下
PS A:\FastestBilibiliDownloader-master\cmd> go run .\start-concurrent-engine.go
Please enter your id type(`aid` or `upid`)
aid
Please enter your id
71590444
2020/04/02 22:46:09 Start working.
2020/04/02 22:46:10 71590444:5_1.flv is downloading.
2020/04/02 22:46:10 71590444:2_1.flv is downloading.
2020/04/02 22:46:10 71590444:4_1.flv is downloading.
2020/04/02 22:46:10 71590444:3_1.flv is downloading.
2020/04/02 22:46:10 71590444:1_1.flv is downloading.
2020/04/02 22:47:59 71590444:3_1.flv has finished.
2020/04/02 22:48:07 71590444:1_1.flv has finished.
2020/04/02 22:50:20 71590444:2_1.flv has finished.
2020/04/02 22:53:14 71590444:4_1.flv has finished.
2020/04/02 22:57:44 71590444:5_1.flv has finished.
2020/04/02 22:57:44 All work has done
flv文件保留着, 但还是没有output.mp4
而且那个concact.txt文件也没有, 应该是没有执行到相应的代码
在下载B站视频的同时,把nfo信息也爬取下来,用以emby等视频管理工具
nfo参考
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<movie>
<plot>透心凉,心飞扬!
每日猫片,活力再现!</plot>
<title>每日一遍,烦恼再见!</title>
<year>2020</year>
<mpaa>PG</mpaa>
<customrating>PG</customrating>
<countrycode>CN</countrycode>
<premiered>2020-06-29</premiered>
<release>2020-06-29</release>
<runtime>190秒</runtime>
<country>**</country>
<id>BV1et4y197na</id>
<num>BV1et4y197na</num>
<genre>全能打卡挑战</genre>
<genre>动物圈</genre>
<genre>可爱</genre>
<genre>猫片</genre>
<genre>猫咪</genre>
<genre>萌宠</genre>
<genre>喵星人</genre>
<genre>每日一遍,烦恼再见!</genre>
<genre>喵星人</genre>
<genre>戒喵中心</genre>
<genre>https://www.bilibili.com/video/BV1et4y197na</genre>
<genre>cid:207002784</genre>
<genre>aid:626189984</genre>
<genre>1088x1920</genre>
<genre>2020-06-29</genre>
<tag>全能打卡挑战</tag>
<tag>动物圈</tag>
<tag>可爱</tag>
<tag>猫片</tag>
<tag>猫咪</tag>
<tag>萌宠</tag>
<tag>喵星人</tag>
<tag>每日一遍,烦恼再见!</tag>
<tag>喵星人</tag>
<tag>戒喵中心</tag>
<tag>https://www.bilibili.com/video/BV1et4y197na</tag>
<tag>cid:207002784</tag>
<tag>aid:626189984</tag>
<tag>1088x1920</tag>
<tag>2020-06-29</tag>
<actor>
<name>戒喵中心</name>
<type>Actor</type>
</actor>
</movie>
test
按照步骤一路到了./start-concurrent-engine
之后输入id的手,
以 https://space.bilibili.com/478455738 为例,
输入478455738的时候,一直提示
Wrong type you enter
OS: win10 pro
Go: go version go1.15.5 windows/amd64
2022/01/22 10:31:50 253258169:53_1.flv is downloading.
2022/01/22 10:31:52 253258169:5_1.flv has finished.
2022/01/22 10:31:53 253258169:58_1.flv is downloading.
2022/01/22 10:32:09 Failed to download video 489247744
2022/01/22 10:32:11 253258169:60_1.flv is downloading.
2022/01/22 10:34:00 253258169:34_1.flv has finished.
2022/01/22 10:34:01 253258169:67_1.flv is downloading
失败了其中一个, 不会要我重跑吧, 工程主帮忙实现一个错误重新下载的吧
如何使用啊?不会啊
运行环境为Ubuntu running in win10 ,clone 代码后运行。
当提示正在下载时,能在download找到文件。但下载完成后,文件丢失。
AA@PC1:/mnt/c/Users/AA/FastestBilibiliDownloader$ go run cmd/start-concurrent-engine.go
Please enter your id type(aid
or upid
)
aid
Please enter your id
202986725
2020/11/29 19:00:37 Start working.
2020/11/29 19:00:38 202986725:1_1.flv is downloading.
2020/11/29 19:11:33 202986725:1_1.flv has finished.
2020/11/29 19:11:33 202986725 download completed.Start merging videos now.
2020/11/29 19:11:44 Video 202986725 merge is complete.
2020/11/29 19:11:44 All work has done
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.