1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2025-01-31 19:51:34 +01:00

[patreon] fix bootstrap data extraction (#5624)

again
This commit is contained in:
Mike Fährmann 2024-05-22 00:17:49 +02:00
parent 141efc2ad3
commit bc25636e63
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -263,8 +263,9 @@ class PatreonExtractor(Extractor):
page, 'id="__NEXT_DATA__" type="application/json">', '</script') page, 'id="__NEXT_DATA__" type="application/json">', '</script')
if data: if data:
try: try:
return (util.json_loads(data)["props"]["pageProps"] data = util.json_loads(data)
["bootstrapEnvelope"]["bootstrap"]) env = data["props"]["pageProps"]["bootstrapEnvelope"]
return env.get("pageBootstrap") or env["bootstrap"]
except Exception as exc: except Exception as exc:
self.log.debug("%s: %s", exc.__class__.__name__, exc) self.log.debug("%s: %s", exc.__class__.__name__, exc)