diff --git a/gallery_dl/extractor/piczel.py b/gallery_dl/extractor/piczel.py index 41b1039e82..064967de9e 100644 --- a/gallery_dl/extractor/piczel.py +++ b/gallery_dl/extractor/piczel.py @@ -10,7 +10,6 @@ from .common import Extractor, Message from .. import text -import json class PiczelExtractor(Extractor): @@ -137,8 +136,5 @@ def __init__(self, match): self.image_id = match.group(1) def posts(self): - url = "{}/gallery/image/{}".format(self.root, self.image_id) - page = self.request(url).text - data = json.loads(text.extract( - page, 'window.__PRELOADED_STATE__ =', '')[0]) - return (data["gallery"]["images"]["byId"][self.image_id],) + url = "{}/api/gallery/{}".format(self.root, self.image_id) + return (self.request(url).json(),)