summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/fantia.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2023-10-22 01:00:14 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2023-10-22 01:00:14 -0400
commite052f3b9e1d9703a5a466daeaf37bacf476c2daf (patch)
treefc608c7d452695706fb13e2b0b34671f569f3ab0 /gallery_dl/extractor/fantia.py
parentb8758ecd073910ce3220b2e68399147b425c37b8 (diff)
New upstream version 1.26.1.upstream/1.26.1
Diffstat (limited to 'gallery_dl/extractor/fantia.py')
-rw-r--r--gallery_dl/extractor/fantia.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/gallery_dl/extractor/fantia.py b/gallery_dl/extractor/fantia.py
index f1d51e2..4a67695 100644
--- a/gallery_dl/extractor/fantia.py
+++ b/gallery_dl/extractor/fantia.py
@@ -42,7 +42,11 @@ class FantiaExtractor(Extractor):
post = self._get_post_data(post_id)
post["num"] = 0
- for content in self._get_post_contents(post):
+ contents = self._get_post_contents(post)
+ post["content_count"] = len(contents)
+ post["content_num"] = 0
+
+ for content in contents:
files = self._process_content(post, content)
yield Message.Directory, post
@@ -59,6 +63,8 @@ class FantiaExtractor(Extractor):
post["content_filename"] or file["file_url"], post)
yield Message.Url, file["file_url"], post
+ post["content_num"] += 1
+
def posts(self):
"""Return post IDs"""
@@ -131,6 +137,7 @@ class FantiaExtractor(Extractor):
post["content_filename"] = content.get("filename") or ""
post["content_id"] = content["id"]
post["content_comment"] = content.get("comment") or ""
+ post["content_num"] += 1
post["plan"] = content["plan"] or self._empty_plan
files = []