mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
22 lines
738 B
JavaScript
22 lines
738 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const commandLineArgs = require("command-line-args");
|
|
const clipboardy = require("clipboardy");
|
|
const downloadFile = async (url) => {
|
|
};
|
|
(async () => {
|
|
const optionDefinitions = [
|
|
{ name: 'parts', alias: 'p', type: Number, defaultValue: 30 },
|
|
{ name: 'output', alias: 'o', type: String, defaultValue: '' },
|
|
];
|
|
const options = commandLineArgs(optionDefinitions);
|
|
const urls = (await clipboardy.read()).split("\n").map(it => it.trim());
|
|
process.on("SIGINT", () => {
|
|
console.log("break");
|
|
process.exit();
|
|
});
|
|
console.log(urls);
|
|
console.log(options);
|
|
urls.forEach(url => downloadFile(url));
|
|
})();
|