[piczel] fix extraction
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright 2018-2019 Mike Fährmann
|
# Copyright 2018-2020 Mike Fährmann
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License version 2 as
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
@@ -23,7 +23,7 @@ class PiczelExtractor(Extractor):
|
|||||||
def items(self):
|
def items(self):
|
||||||
yield Message.Version, 1
|
yield Message.Version, 1
|
||||||
for image in self.unpack(self.images()):
|
for image in self.unpack(self.images()):
|
||||||
url = self.root + "/static" + image["image"]["image"]["url"]
|
url = image["image"]["url"]
|
||||||
yield Message.Directory, image
|
yield Message.Directory, image
|
||||||
yield Message.Url, url, text.nameext_from_url(url, image)
|
yield Message.Url, url, text.nameext_from_url(url, image)
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ class PiczelExtractor(Extractor):
|
|||||||
multi = image["images"]
|
multi = image["images"]
|
||||||
del image["images"]
|
del image["images"]
|
||||||
for image["num"], img in enumerate(multi):
|
for image["num"], img in enumerate(multi):
|
||||||
image["image"] = img
|
image.update(img)
|
||||||
yield image
|
yield image
|
||||||
else:
|
else:
|
||||||
image["num"] = 0
|
image["num"] = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user