diff options
| author | 2022-12-24 17:14:46 -0500 | |
|---|---|---|
| committer | 2022-12-24 17:14:46 -0500 | |
| commit | ebdfcd3cd3f76534a590ba08933ff7ea54813316 (patch) | |
| tree | 35db6003766dff695cf8a5aa24f47629b602b7c0 /gallery_dl/extractor/danbooru.py | |
| parent | 3338dfce719c999467ffe08fd45663be8190057a (diff) | |
New upstream version 1.24.2.upstream/1.24.2
Diffstat (limited to 'gallery_dl/extractor/danbooru.py')
| -rw-r--r-- | gallery_dl/extractor/danbooru.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gallery_dl/extractor/danbooru.py b/gallery_dl/extractor/danbooru.py index 5a44780..ef17176 100644 --- a/gallery_dl/extractor/danbooru.py +++ b/gallery_dl/extractor/danbooru.py @@ -41,6 +41,11 @@ class DanbooruExtractor(BaseExtractor): self.ugoira = self.config("ugoira", False) self.external = self.config("external", False) self.extended_metadata = self.config("metadata", False) + threshold = self.config("threshold") + if isinstance(threshold, int): + self.threshold = 1 if threshold < 1 else threshold + else: + self.threshold = self.per_page username, api_key = self._get_auth_info() if username: @@ -126,7 +131,7 @@ class DanbooruExtractor(BaseExtractor): posts = posts["posts"] yield from posts - if len(posts) < self.per_page: + if len(posts) < self.threshold: return if pagenum: |
