czmecho
V2EX  ›  问与答

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

  •  
  •   czmecho · Oct 8, 2016 · 4009 views
    This topic created in 3537 days ago, the information mentioned may be changed or developed.
    youtube-dl 是在本地通过代理运行的,时不时会自动断开,很多情况下是因为网络问题。 2~3 M/s 的速度应该不至于导致连接被干扰吧。
    是 windows 平台,不知道有没有办法解决?
    6 replies    2016-10-08 21:03:50 +08:00
    sutra
        1
    sutra  
       Oct 8, 2016   ❤️ 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
       Oct 8, 2016
    @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  
       Oct 8, 2016   ❤️ 1
    用 you-get 试试?
    TheOtherBruce
        4
    TheOtherBruce  
       Oct 8, 2016
    我是用 proxychains4 把桥和 youtube-dl 连起来的,稳定,不知道你使用什么连的
    why1
        5
    why1  
       Oct 8, 2016
    for do youtube-dl --socket-timeout 60
    不知道如何下载完成能退出 for
    czmecho
        6
    czmecho  
    OP
       Oct 8, 2016
    @TheOtherBruce 在环境变量当中添加 HTTP_PROXY 和 HTTP_PROXYS ,因为我用的是 MEOW ,自动转为 HTTP 代理的。用 SSR 也可以自动转为 HTTP 代理。
    我的是 windows 平台的,不知道会不会因为平台原因。

    我查了我出错的提示,要么是 SSL 的问题,要么是 python 的问题。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   974 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 22:07 · PVG 06:07 · LAX 15:07 · JFK 18:07
    ♥ Do have faith in what you're doing.