Git Product home page Git Product logo

Comments (3)

bardisty avatar bardisty commented on July 30, 2024

You can control the delay between downloads using youtube-dl's --sleep-interval option:

--sleep-interval SECONDS

Number of seconds to sleep before each download when used alone or a lower bound of a range for randomized sleep before each download (minimum possible number of seconds to sleep) when used along with --max-sleep-interval.

--max-sleep-interval SECONDS

Upper bound of a range for randomized sleep before each download (maximum possible number of seconds to sleep). Must only be used along with --min-sleep-interval.

To add this to ytdlrc, find the download_all_the_things() function where all of youtube-dl's flags are set:

ytdlrc/ytdlrc

Line 204 in af7ef72

download_all_the_things() {

Then just add it in, e.g.:

download_all_the_things() {
  # shellcheck disable=SC2086
  youtube-dl \
    --force-ipv4 \
    --continue \
    --download-archive "$ytdl_archive_list" \
    --exec "rclone $rclone_command \
      '{}' '${rclone_destination%/}/${video_value}' \
      --config '$rclone_config' \
      $rclone_flags \
      $rclone_debug_flags" \
    --format "$ytdl_format" \
    --ignore-config \
    --ignore-errors \
    --no-overwrites \
    --output "${ytdl_download_dir%/}/${video_value}/${ytdl_output_template}" \
    --restrict-filenames \
    --sleep-interval 10 \
    --write-description \
    --write-info-json \
    --write-thumbnail \
    "$ytdl_debug_flags" \
    $ytdl_subtitle_flags \
    $ytdl_xattrs_flag \
    "$1"
}

Hopefully that helps. If not you might need to get a new IPv4 IP or use a proxy:

https://github.com/ytdl-org/youtube-dl#http-error-429-too-many-requests-or-402-payment-required

There's been github issues about this problem for years, though it appears there's been an influx of new ones related to it beginning around July 9th:

You might want to explore those issues for other potential solutions.

from ytdlrc.

revilo951 avatar revilo951 commented on July 30, 2024

Well, that'll work. Hopefully, I don't need to get a new IPv4 address. On that note, why you do you specify the --force-ipv4 flag?

from ytdlrc.

bardisty avatar bardisty commented on July 30, 2024

On that note, why you do you specify the --force-ipv4 flag?

Mostly because performance was significantly better over IPv4 during initial testing (2 years ago), and because a lot of people experience issues with YouTube blocking IPv6 addresses of various hosts (OVH, DigitalOcean, etc.) due to abuse.

If you have IPv6 setup, feel free to remove the flag and see how things are. If it's fine, that might be all you need to avoid the 429 error.

from ytdlrc.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.