[sankaku] simplify 'pool' tags (#1388)

normalize 'tags' and 'artist_tags' to a string-list
This commit is contained in:
Mike Fährmann
2021-03-23 18:41:11 +01:00
parent d085ade9d5
commit 0e601de67b

View File

@@ -124,9 +124,13 @@ class SankakuPoolExtractor(SankakuExtractor):
def metadata(self):
pool = SankakuAPI(self).pools(self.pool_id)
pool["tags"] = [tag["name"] for tag in pool["tags"]]
pool["artist_tags"] = [tag["name"] for tag in pool["artist_tags"]]
self._posts = pool.pop("posts")
for num, post in enumerate(self._posts, 1):
post["num"] = num
return {"pool": pool}
def posts(self):