From 75582e38e9a213d455d6852228b224313db1cb41 Mon Sep 17 00:00:00 2001 From: Appu Date: Mon, 14 Jul 2025 15:29:22 +0200 Subject: [PATCH] [VSCO] Fix JSON returned by VSCO (#7821) * [VSCO] Fix JSON returned by VSCO The JSON returned contains multiple `undefined` values that aren't valid JSON, changing these values to `null` fixes the issue. * [VSCO] Make JSON fix more targeted Change only occurrences that are values of a key-value --- gallery_dl/extractor/vsco.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gallery_dl/extractor/vsco.py b/gallery_dl/extractor/vsco.py index 82858d63..42839a8b 100644 --- a/gallery_dl/extractor/vsco.py +++ b/gallery_dl/extractor/vsco.py @@ -79,7 +79,7 @@ class VscoExtractor(Extractor): def _extract_preload_state(self, url): page = self.request(url, notfound=self.subcategory).text return util.json_loads(text.extr(page, "__PRELOADED_STATE__ = ", "<") - .replace('"prevPageToken":undefined,', '')) + .replace('":undefined', '":null')) def _pagination(self, url, params, token, key, extra=None): headers = {