@@ -66,8 +66,7 @@ class SankakuExtractor(BooruExtractor):
|
|||||||
def _prepare(self, post):
|
def _prepare(self, post):
|
||||||
post["created_at"] = post["created_at"]["s"]
|
post["created_at"] = post["created_at"]["s"]
|
||||||
post["date"] = text.parse_timestamp(post["created_at"])
|
post["date"] = text.parse_timestamp(post["created_at"])
|
||||||
post["tags"] = [tag["name"].lower().replace(" ", "_")
|
post["tags"] = post.pop("tag_names", ())
|
||||||
for tag in post["tags"] if tag["name"]]
|
|
||||||
post["tag_string"] = " ".join(post["tags"])
|
post["tag_string"] = " ".join(post["tags"])
|
||||||
post["_http_validate"] = self._check_expired
|
post["_http_validate"] = self._check_expired
|
||||||
|
|
||||||
|
|||||||
@@ -186,17 +186,10 @@ __tests__ = (
|
|||||||
"#class" : sankaku.SankakuPostExtractor,
|
"#class" : sankaku.SankakuPostExtractor,
|
||||||
"#options" : {"tags": True},
|
"#options" : {"tags": True},
|
||||||
|
|
||||||
"id" : "9PMwlDWjXaB",
|
"id" : "9PMwlDWjXaB",
|
||||||
"md5" : "dc9a3cbfcfee836779bc4f8d5d95c346",
|
"md5" : "dc9a3cbfcfee836779bc4f8d5d95c346",
|
||||||
"tag_names": "len:106",
|
"tags": "len:106",
|
||||||
|
|
||||||
"tags": [
|
|
||||||
"mahou_shoujo_madoka_magica",
|
|
||||||
"mahou_shoujo_madoka_magica:_hangyaku_no_monogatari",
|
|
||||||
"pixiv",
|
|
||||||
"akemi_homura",
|
|
||||||
"kaname_madoka",
|
|
||||||
],
|
|
||||||
"tags_copyright": [
|
"tags_copyright": [
|
||||||
"mahou_shoujo_madoka_magica",
|
"mahou_shoujo_madoka_magica",
|
||||||
"mahou_shoujo_madoka_magica:_hangyaku_no_monogatari",
|
"mahou_shoujo_madoka_magica:_hangyaku_no_monogatari",
|
||||||
|
|||||||
Reference in New Issue
Block a user