[fantia] add 'content_count' and 'content_num' metadata fields (#4627)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -131,6 +135,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 = []
|
||||
|
||||
Reference in New Issue
Block a user