RikaCelery / N_m3u8DL-RE

Cross-Platform, beautiful and powerful stream downloader for DASH/HLS/MSS. English/简体中文/繁體中文.
MIT License
15 stars 2 forks source link

求助,需要限制任务重试的等待时间 #13

Closed j2wyatt closed 3 months ago

j2wyatt commented 3 months ago

我遇到一个问题

这个网站的视频切片应该是有下载频率的限制,或者干脆是负载垃圾,结果就是每一个视频在下载时都会有大量的分片下载失败 我通过尝试使用 猫抓 这个软件在线下载,使用手动重试的方式,我确认这些分片都是可以访问到的,只要重试的次数够多,总能下载到.jpg

这是日志

12:10:47.210 INFO : 保存文件名: index_2024-03-31_12-10-47
12:10:47.211 INFO : 开始下载...Vid Kbps
12:10:50.053 WARN : 读取媒体信息...
12:10:50.356 INFO : [0x100]: Video, h264 (High) ([27][0][0][0]), 600x336, 30 fps
12:10:50.357 INFO : [0x101]: Audio, aac (LC) ([15][0][0][0]), 4 kb/s
12:10:54.766 WARN : Response status code does not indicate success: 503 (Service Temporarily Unavailable).
12:10:54.771 WARN : Response status code does not indicate success: 503 (Service Temporarily Unavailable).
12:10:54.799 WARN : Response status code does not indicate success: 503 (Service Temporarily Unavailable).
12:10:58.589 WARN : Response status code does not indicate success: 503 (Service Temporarily Unavailable).
12:10:58.590 WARN : Response status code does not indicate success: 503 (Service Temporarily Unavailable).
12:10:58.598 WARN : Response status code does not indicate success: 503 (Service Temporarily Unavailable).
12:10:59.568 WARN : Response status code does not indicate success: 503 (Service Temporarily Unavailable).
12:11:02.391 WARN : Response status code does not indicate success: 503 (Service Temporarily Unavailable).

排查过程

所以我的想法就是直接重试到足够的次数,直到视频分片全部下载下来 我尝试了这个命令参数:N_m3u8DL-RE test.index --download-retry-count 1000,但是没用,我怀疑是重试的太快了,导致每次都是失败

然后我又尝试限制多线程,降低下载频率:N_m3u8DL-RE test.index --thread-count 1 --download-retry-count 1000',结果也是有大量失败

求助

j2wyatt commented 3 months ago

解决了,原来是我代码写的不对,调用的时候,参数没有传进去