summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/danbooru.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/danbooru.py')
-rw-r--r--gallery_dl/extractor/danbooru.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/gallery_dl/extractor/danbooru.py b/gallery_dl/extractor/danbooru.py
index 9e6516e..09beb5f 100644
--- a/gallery_dl/extractor/danbooru.py
+++ b/gallery_dl/extractor/danbooru.py
@@ -20,7 +20,7 @@ class DanbooruExtractor(BaseExtractor):
page_limit = 1000
page_start = None
per_page = 200
- request_interval = 1.0
+ request_interval = (0.5, 1.5)
def _init(self):
self.ugoira = self.config("ugoira", False)
@@ -72,6 +72,25 @@ class DanbooruExtractor(BaseExtractor):
post["date"] = text.parse_datetime(
post["created_at"], "%Y-%m-%dT%H:%M:%S.%f%z")
+ post["tags"] = (
+ post["tag_string"].split(" ")
+ if post["tag_string"] else ())
+ post["tags_artist"] = (
+ post["tag_string_artist"].split(" ")
+ if post["tag_string_artist"] else ())
+ post["tags_character"] = (
+ post["tag_string_character"].split(" ")
+ if post["tag_string_character"] else ())
+ post["tags_copyright"] = (
+ post["tag_string_copyright"].split(" ")
+ if post["tag_string_copyright"] else ())
+ post["tags_general"] = (
+ post["tag_string_general"].split(" ")
+ if post["tag_string_general"] else ())
+ post["tags_meta"] = (
+ post["tag_string_meta"].split(" ")
+ if post["tag_string_meta"] else ())
+
if post["extension"] == "zip":
if self.ugoira:
post["frames"] = self._ugoira_frames(post)