feat: update wget.ts

This commit is contained in:
2025-01-19 13:29:14 +08:00
parent 294d523039
commit 28153b7b83
2 changed files with 3 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
// - https://docs.deno.com/examples/command_line_arguments/
// - https://jsr.io/@chiba/wget/1.0.0/mod.ts
import { parseArgs } from "jsr:@std/cli/parse-args";
import {parseArgs} from "jsr:@std/cli/parse-args";
import {
clearLastLine,
formatHumanTime,
@@ -31,7 +31,6 @@ function getOutputFilename(filename: string): string {
}
function getFilenameFromUrl(url: string): string {
// response.headers.get("Content-Disposition") // TODO
const array = new URL(url).pathname.split("/");
let filename = array[array.length - 1].trim();
if (!filename) {