Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
fix: quotes replacement (javascript)
NTFSvolumeb21be41c675b
diff --git a/cyberdrop_dl/utils/javascript.py b/cyberdrop_dl/utils/javascript.pyindex a79f364c3..ccb64eed6 100644--- a/cyberdrop_dl/utils/javascript.py+++ b/cyberdrop_dl/utils/javascript.py@@ -35,7 +35,8 @@ def parse_js_vars(js_text: str) -> dict:def parse_json_to_dict(js_text: str, use_regex: bool = True) -> dict:- json_str = js_text.replace("\t", "").replace("\n", "").replace("'", '"').strip()+ json_str = js_text.replace("\t", "").replace("\n", "").strip()+ json_str = replace_quotes(json_str)if use_regex:json_str = scape_urls(json_str)json_str = re.sub(*QUOTE_KEYS_REGEX, json_str)@@ -44,6 +45,10 @@ def parse_json_to_dict(js_text: str, use_regex: bool = True) -> dict:return json.loads(json_str)+def replace_quotes(js_text: str) -> str:+ return js_text.replace(",'", ',"').replace("':", '":').replace(", '", ', "').replace("' :", '" :')++def is_valid_key(key: str) -> bool:return not any(p in key for p in ("@", "m3u8"))