diff --git a/gallery_dl/extractor/patreon.py b/gallery_dl/extractor/patreon.py index 0975992f59..6e05afd55c 100644 --- a/gallery_dl/extractor/patreon.py +++ b/gallery_dl/extractor/patreon.py @@ -249,8 +249,14 @@ def _build_file_generators(self, filetypes): return [genmap[ft] for ft in filetypes] def _extract_bootstrap(self, page): - return util.json_loads(text.extr( - page, "window.patreon.bootstrap,", "});") + "}") + if "window.patreon.bootstrap," in page: + return util.json_loads(text.extr( + page, "window.patreon.bootstrap,", "});") + "}") + elif 'window.patreon = {"bootstrap":' in page: + return util.json_loads(text.extr( + page, 'window.patreon = {"bootstrap":', '},"apiServer"') + "}") + else: + raise Exception("unknown HTML and JS structure") class PatreonCreatorExtractor(PatreonExtractor):