[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:
@@ -79,7 +79,7 @@ class VscoExtractor(Extractor):
|
|||||||
def _extract_preload_state(self, url):
|
def _extract_preload_state(self, url):
|
||||||
page = self.request(url, notfound=self.subcategory).text
|
page = self.request(url, notfound=self.subcategory).text
|
||||||
return util.json_loads(text.extr(page, "__PRELOADED_STATE__ = ", "<")
|
return util.json_loads(text.extr(page, "__PRELOADED_STATE__ = ", "<")
|
||||||
.replace('"prevPageToken":undefined,', ''))
|
.replace('":undefined', '":null'))
|
||||||
|
|
||||||
def _pagination(self, url, params, token, key, extra=None):
|
def _pagination(self, url, params, token, key, extra=None):
|
||||||
headers = {
|
headers = {
|
||||||
|
|||||||
Reference in New Issue
Block a user