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

使用下载课程指定章节和下载课程全部视频出现异常 #57

@0ming0

Description

@0ming0

image
image
使用过程中会出现这个
因为课程内容大小不一样 重复这个过程最多能够下载完成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 值修改大一点?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions