diff --git a/script-meta-v2.json b/script-meta-v2.json index b875525..e57b53c 100644 --- a/script-meta-v2.json +++ b/script-meta-v2.json @@ -88,11 +88,11 @@ }, "wget.ts": { "script_name": "wget.ts", - "script_length": 3986, - "script_sha256": "84239c527ed1edae70b36bebd0ad5f6a808e8e6b84c04b403ebf21248cb76d7c", + "script_length": 4069, + "script_sha256": "4b66d00dcf450e349553419fea50d2ada1ac539a13374beda6df3f7b44bc7927", "script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/wget.ts", "single_script_file": true, "publish_time": 1737272626139, - "update_time": 1737650670433 + "update_time": 1742738412083 } } \ No newline at end of file diff --git a/single-scripts/wget.ts b/single-scripts/wget.ts index 1f93f0c..b6b0cec 100755 --- a/single-scripts/wget.ts +++ b/single-scripts/wget.ts @@ -37,7 +37,11 @@ function getFilenameFromUrl(url: string): string { if (!filename) { filename = "index.html"; } - return filename; + try { + return decodeURIComponent(filename); + } catch (e) { + return filename; + } } function getOutputFilenameFromUrl(url: string): string { @@ -137,5 +141,5 @@ log.success( }`, ); -// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20250124T004247+08:00.MEYCIQCsT/Zzt0SJxCiKOC3a -// 9bQrIKB/ACboAmYBKI/J3NFxaQIhAP4QhCiNBuW8VmCt3vcLtR9j5dEAifR8dpJFeloUXCWb +// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20250323T215914+08:00.MEUCIQDMzVu+oh/6ES4XhxQX +// sIMB7e2ApNkqkROUqf10xgZqVQIgdSARi8Wg4WDWHVL2YB8WsMYZEJKafSTSt5Za+hy7dcY=