This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Description


使用过程中会出现这个
因为课程内容大小不一样 重复这个过程最多能够下载完成3个视频 但是剩下的就怎么都下载不完了 有的章节10来个视频呢
如果使用下载课程全部视频 会继续上面的那个错误跳到下个章节序列继续下载 但是也是下载不全 不知道怎么解决
def run_shell(shell, retry=True, retry_times=3):
cmd = subprocess.Popen(
shell,
close_fds=True,
shell=True,
bufsize=1,
stderr=subprocess.DEVNULL,
stdout=subprocess.DEVNULL,
)
if retry and cmd.returncode != 0:
time.sleep(1)
if retry_times > 0:
return run_shell(shell, retry=True, retry_times=retry_times - 1)
print('\nShell出现异常,请自行查看课程文件是否转码成功')
return cmd.returncode
我感觉是不是这个地方有问题造成的
是不是def run_shell(shell, retry=True, retry_times=3): 这个retry_times=3 值修改大一点?