mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-01-31 11:41:35 +01:00
[piczel] fix extraction for single images
This commit is contained in:
parent
699036ea0c
commit
c034159701
@ -10,7 +10,6 @@
|
||||
|
||||
from .common import Extractor, Message
|
||||
from .. import text
|
||||
import json
|
||||
|
||||
|
||||
class PiczelExtractor(Extractor):
|
||||
@ -137,8 +136,5 @@ class PiczelImageExtractor(PiczelExtractor):
|
||||
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__ =', '</script>')[0])
|
||||
return (data["gallery"]["images"]["byId"][self.image_id],)
|
||||
url = "{}/api/gallery/{}".format(self.root, self.image_id)
|
||||
return (self.request(url).json(),)
|
||||
|
Loading…
x
Reference in New Issue
Block a user