[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
This commit is contained in:
Appu
2025-07-14 15:29:22 +02:00
committed by GitHub
parent a7ebb835ea
commit 75582e38e9

View File

@@ -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 = {