V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
czmecho
V2EX  ›  问与答

请问能否让 youtube-dl 断开后自动重启?

  •  
  •   czmecho · 2016-10-08 10:18:13 +08:00 · 3386 次点击
    这是一个创建于 2773 天前的主题,其中的信息可能已经有所发展或是发生改变。
    youtube-dl 是在本地通过代理运行的,时不时会自动断开,很多情况下是因为网络问题。 2~3 M/s 的速度应该不至于导致连接被干扰吧。
    是 windows 平台,不知道有没有办法解决?
    6 条回复    2016-10-08 21:03:50 +08:00
    sutra
        1
    sutra  
       2016-10-08 11:26:29 +08:00   ❤️ 1
    -R, --retries RETRIES Number of retries (default is 10), or "infinite".
    --fragment-retries RETRIES Number of retries for a fragment (default is 10), or "infinite" (DASH and hlsnative only)

    B.T.W.
    --socket-timeout SECONDS Time to wait before giving up, in seconds
    --external-downloader COMMAND Use the specified external downloader. Currently supports aria2c,avconv,axel,curl,ffmpeg,httpie,wget
    czmecho
        2
    czmecho  
    OP
       2016-10-08 13:54:24 +08:00
    @sutra
    还是会出现这样的错误:
    ERROR: unable to download video data: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:1748)

    已经设置重试了,然而还是会自动断开。
    TangMonk
        3
    TangMonk  
       2016-10-08 14:07:10 +08:00   ❤️ 1
    用 you-get 试试?
    TheOtherBruce
        4
    TheOtherBruce  
       2016-10-08 16:21:41 +08:00
    我是用 proxychains4 把桥和 youtube-dl 连起来的,稳定,不知道你使用什么连的
    why1
        5
    why1  
       2016-10-08 20:50:09 +08:00
    for do youtube-dl --socket-timeout 60
    不知道如何下载完成能退出 for
    czmecho
        6
    czmecho  
    OP
       2016-10-08 21:03:50 +08:00
    @TheOtherBruce 在环境变量当中添加 HTTP_PROXY 和 HTTP_PROXYS ,因为我用的是 MEOW ,自动转为 HTTP 代理的。用 SSR 也可以自动转为 HTTP 代理。
    我的是 windows 平台的,不知道会不会因为平台原因。

    我查了我出错的提示,要么是 SSL 的问题,要么是 python 的问题。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   930 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 21:53 · PVG 05:53 · LAX 14:53 · JFK 17:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.