feat: update wget.ts
This commit is contained in:
@@ -40,8 +40,8 @@
|
|||||||
},
|
},
|
||||||
"wget.ts": {
|
"wget.ts": {
|
||||||
"script_name": "wget.ts",
|
"script_name": "wget.ts",
|
||||||
"script_length": 3909,
|
"script_length": 3848,
|
||||||
"script_sha256": "3f9b61749f9db5d18e2a6ec29cc65f5209ff1c34db0711a4083b07432bebc562",
|
"script_sha256": "02108963e530b4ae422172f93e373858e89206cfeb6b6df4ea74105600ee3a45",
|
||||||
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/wget.ts",
|
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/wget.ts",
|
||||||
"single_script_file": true
|
"single_script_file": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ function getOutputFilename(filename: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getFilenameFromUrl(url: string): string {
|
function getFilenameFromUrl(url: string): string {
|
||||||
// response.headers.get("Content-Disposition") // TODO
|
|
||||||
const array = new URL(url).pathname.split("/");
|
const array = new URL(url).pathname.split("/");
|
||||||
let filename = array[array.length - 1].trim();
|
let filename = array[array.length - 1].trim();
|
||||||
if (!filename) {
|
if (!filename) {
|
||||||
|
|||||||
Reference in New Issue
Block a user