gallery-dl
gallery-dl copied to clipboard
Extractor sleep between downloads
I wrote an extractor for a site that rate limits you somewhat, I would like to set a default delay between downloads that the user can optionally override using the "sleep" parameter. What's the best way to do this?
The currently only way is to set a value for request_interval
, which can either be a float or a 2-tuple of floats. This does however not affect downloads, only background HTTP requests that fetch download links.
https://github.com/mikf/gallery-dl/blob/64202dd0123d62b2d5d380fe0b3c4e54d6ad9c25/gallery_dl/extractor/instagram.py#L32