diff --git a/docs/configuration.rst b/docs/configuration.rst index 668a774c..f19f7a96 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -208,6 +208,16 @@ Description Number of seconds to sleep before each download. =========== ===== +extractor.*.sleep-extractor +--------------------------- +=========== ===== +Type ``float`` +Default ``0`` +Description Number of seconds to sleep before handling an input URL, + i.e. before starting a new extractor. +=========== ===== + + extractor.*.username & .password -------------------------------- =========== ===== diff --git a/gallery_dl/job.py b/gallery_dl/job.py index c9f89319..8d1849ca 100644 --- a/gallery_dl/job.py +++ b/gallery_dl/job.py @@ -59,6 +59,9 @@ class Job(): def run(self): """Execute or run the job""" + sleep = self.extractor.config("sleep-extractor") + if sleep: + time.sleep(sleep) try: log = self.extractor.log for msg in self.extractor: @@ -586,6 +589,10 @@ class DataJob(Job): self.filter = (lambda x: x) if private else util.filter_dict def run(self): + sleep = self.extractor.config("sleep-extractor") + if sleep: + time.sleep(sleep) + # collect data try: for msg in self.extractor: