1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2025-01-31 11:41:35 +01:00

[issuu] fix extraction

This commit is contained in:
Mike Fährmann 2024-01-20 16:44:48 +01:00
parent 9ca6117c67
commit 9599151118
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -29,8 +29,9 @@ class IssuuPublicationExtractor(IssuuBase, GalleryExtractor):
example = "https://issuu.com/issuu/docs/TITLE/"
def metadata(self, page):
pos = page.rindex('id="initial-data"')
data = util.json_loads(text.rextract(
page, '<script data-json="', '"')[0].replace("&quot;", '"'))
page, '<script data-json="', '"', pos)[0].replace("&quot;", '"'))
doc = data["initialDocumentData"]["document"]
doc["date"] = text.parse_datetime(