question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Control sleep between downloads

See original GitHub issue

I would love to be able to manually control, via a flag, the delay between downloads, instead of the hardcoded value in e.g. https://github.com/rg3/youtube-dl/blob/244cd04237fe4a1e4d92421711f41de3c2566d5c/youtube_dl/extractor/pluralsight.py#L214:

                # Pluralsight tracks multiple sequential calls to ViewClip API and start
                # to return 429 HTTP errors after some time (see
                # https://github.com/rg3/youtube-dl/pull/6989). Moreover it may even lead
                # to account ban (see https://github.com/rg3/youtube-dl/issues/6842).
                # To somewhat reduce the probability of these consequences
                # we will sleep random amount of time before each call to ViewClip.
                self._sleep(
                    random.randint(2, 5), display_id,
                    '%(video_id)s: Waiting for %(timeout)s seconds to avoid throttling')

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

9reactions
DeveloperMCDcommented, Oct 17, 2019

Why does the --sleep-interval not kick in when a file “has already been downloaded and merged”?

[download] Downloading video 1 of 905 [youtube] zVqbC3C_2Uo: Downloading webpage [youtube] zVqbC3C_2Uo: Downloading video info webpage [download] Sleeping 90 seconds… Destination: Key group behind Amazon Synod is funded by large U.S. pro-abortion charity-zVqbC3C_2Uo.f136.mp4 [download] 100% of 21.57MiB in 00:00 [download] Sleeping 90 seconds… [download] Destination: Key group behind Amazon Synod is funded by large U.S. pro-abortion charity-zVqbC3C_2Uo.f140.m4a [download] 100% of 2.72MiB in 00:00 [ffmpeg] Merging formats into “Key group behind Amazon Synod is funded by large U.S. pro-abortion charity-zVqbC3C_2Uo.mp4” Deleting original file Key group behind Amazon Synod is funded by large U.S. pro-abortion charity-zVqbC3C_2Uo.f136.mp4 (pass -k to keep) Deleting original file Key group behind Amazon Synod is funded by large U.S. pro-abortion charity-zVqbC3C_2Uo.f140.m4a (pass -k to keep)

(…Skipping 190+ videos that are already present in download log…)

[download] Downloading video 193 of 905 [youtube] xPL2y61Xj8M: Downloading webpage [youtube] xPL2y61Xj8M: Downloading video info webpage [download] Mother Miriam Live! 7.3.2019-xPL2y61Xj8M.mp4 has already been downloaded and merged [download] Downloading video 194 of 905 [youtube] DzcQWkJ7sNA: Downloading webpage [youtube] DzcQWkJ7sNA: Downloading video info webpage WARNING: Requested formats are incompatible for merge and will be merged into mkv. [download] Mother Miriam Live! 7.2.2019-DzcQWkJ7sNA.mkv has already been downloaded and merged [download] Downloading video 195 of 905 [youtube] zErHxgRDuow: Downloading webpage [youtube] zErHxgRDuow: Downloading video info webpage WARNING: Requested formats are incompatible for merge and will be merged into mkv. [download] Professor Roberto de Mattei explains the crisis in the Church - Part 2 of 2-zErHxgRDuow.mkv has already been downloaded and merged [download] Downloading video 196 of 905

…and continues for 80 more videos, until Youtube blocks my IP address for a while.

1reaction
borniocommented, Jun 14, 2016

@dstftw That doesn’t seem to impact playlists. Once in a playlist download, only the internal sleep of randint(2,5) is in effect.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Control sleep between downloads · Issue #9770 · ytdl ... - GitHub
Delay between downloads is controlled by --sleep-interval . Ability to control this interval will result in almost immediate bans when it's ...
Read more >
Computer Goes To Sleep While Downloading
Check your power plan settings. On the one that is selected, click Change plan settings, Change advanced power settings, under the Sleep section...
Read more >
How to Continue your Downloading in Sleep Mode - YouTube
Will my PC continue to download in sleep mode? how to keep downloading when sleep mode windows 10 how to stop computer from...
Read more >
stop computer from going to sleep when downloading [duplicate]
Try going into your Control Panel>System & Security>Power options>Change when the computer sleeps and then change your settings so that it ...
Read more >
How do I postpone PC from sleeping while downloading?
1. Open Power Options by clicking the Start button Picture of the Start button, clicking Control Panel, clicking System and Security, and then...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found