Skip to content

Commit

Permalink
[sankaku] simplify 'pool' tags (#1388)
Browse files Browse the repository at this point in the history
normalize 'tags' and 'artist_tags' to a string-list
  • Loading branch information
mikf committed Mar 23, 2021
1 parent d085ade commit 0e601de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gallery_dl/extractor/sankaku.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,13 @@ def __init__(self, match):

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):
Expand Down

0 comments on commit 0e601de

Please sign in to comment.