[deviantart:stash] fix JSONDecodeEerror for folders (#8750)

remove extra ',"submit":{}' after end of JSON object
This commit is contained in:
Mike Fährmann
2025-12-23 20:54:46 +01:00
parent cc8cd78103
commit 9c50c10f1a

View File

@@ -1074,6 +1074,8 @@ class DeviantartStashExtractor(DeviantartExtractor):
return
if stash_data := text.extr(page, ',\\"stash\\":', ',\\"@@'):
if stash_data.endswith(":{}"):
stash_data = stash_data[:stash_data.rfind("}", None, -2)+1]
stash_data = util.json_loads(self._unescape_json(stash_data))
for sid in text.extract_iter(