feat: update wget.ts
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user