Skip to content

Commit

Permalink
Fixed lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ssdaniel24 committed Oct 13, 2024
1 parent 95f6d0f commit 86f32c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gallery_dl/extractor/rule34vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ def _parse_post(self, post_id):
url = "{}/api/v2/post/{}".format(self.root, post_id)
data = self.request(url).json()

tags = " ".join(t["value"].replace(" ", "_") for t in data["tags"])
post = {
"id": post_id,
"tags": " ".join(t["value"].replace(" ", "_") for t in data["tags"]),
"tags": tags,
"uploader": data["uploader"]["userName"],
"score": data.get("likes") or 0,
"width": data["width"],
Expand All @@ -43,6 +44,7 @@ def _parse_post(self, post_id):

return post


class Rule34vaultPostExtractor(Rule34vaultExtractor):
subcategory = "post"
archive_fmt = "{id}"
Expand All @@ -56,6 +58,7 @@ def __init__(self, match):
def posts(self):
return (self._parse_post(self.post_id),)


class Rule34vaultPlaylistExtractor(Rule34vaultExtractor):
subcategory = "playlist"
directory_fmt = ("{category}", "{playlist_id}")
Expand Down Expand Up @@ -90,6 +93,7 @@ def posts(self):
return
current_page += 1


class Rule34vaultTagExtractor(Rule34vaultExtractor):
subcategory = "tag"
directory_fmt = ("{category}", "{search_tags}")
Expand Down

0 comments on commit 86f32c4

Please sign in to comment.