View Single Post
Old 09.06.2022, 12:29
StefanM's Avatar
StefanM StefanM is offline
Join Date: Oct 2020
Posts: 440
Default Script to add (random) delays between requests and/or downloads

@mgpai or anyone who can help

Adding (random) delays between requests and/or downloads

Many webpages detect too many requests/downloads in a short period of time and then block the user IP for some time.
That's why with some Download Managers the user can define delays between requests/downloads.

If possible, a script for this would really be appreciated.

A possible URS would look like this

A) Timer definition (optional!)
The user can either define a fixed delay in seconds. Optional (not that important): User can define a random delay between X and Y seconds.
Note: To make things not too complicated, a script with a fixed delay, e.g. 2 seconds, would be fine with me.

B) (Random) delay while grabbing links
Link grabbing must be reduced to only one request at a time. After a request has been sent by JD, the 'programmed' timer will start.

Once the timer has run out, the next request will be sent.

C) (Random) delay while downloading
Max. simultaneous downloads should work as usual. Let's assume the limit was set to 3:

JD should start with the first download. At the same time the 'programmed' timer will start.

Once the timer has run out, the second download will be started. Again the 'programmed' timer will start. Once the timer has run out, the third download will be started. Once again, the 'programmed' timer will start.

If one of those three downloads has been finished, a new download will not be started before the timer has run out.

PS: I filed this as a feature request first, but it was declined. At the same time pspzockerscene recommended to ask for such a script here.
Reply With Quote