Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

Commit

Permalink
Update to v1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
peppelongo96 committed Oct 3, 2020
1 parent 1b20758 commit e3a5542
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 49 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ This project is a fork of [PoliDown](https://github.com/sup3rgiu/PoliDown)* that
- Updating and upgrading project dependencies. **Do a clean installation or execute** `$ npm install` **command**
- README update: please follow EDIT paragraph of point 1 in [important notes](https://github.com/peppelongo96/UnicalDown#important-notes)
#### [v1.7.4](https://github.com/peppelongo96/UnicalDown/archive/v1.7.4.zip)
-
- Fix and update dependencies installing. **Do a clean installation or execute** `$ npm install` **command**
- Add noob checks with easy-launchers executing
- README update: please follow the [prereqs](https://github.com/peppelongo96/UnicalDown#prereqs) section

### Disclaimer
Hopefully this doesn't break the end user agreement for Microsoft Stream. Since we're simply saving the HLS stream to disk as if we were a browser, this does not abuse the streaming endpoints. However I take no responsibility if either Microsoft or your Office 365 admins request a chat with you in a small white room.
Expand Down
60 changes: 27 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "git",
"url": "https://github.com/peppelongo96/UnicalDown"
},
"version": "1.7.3",
"version": "1.7.4",
"description": "Locally save Microsoft Stream not-download-enabled videos uploaded by Università della Calabria",
"main": "unicaldown.js",
"keywords": [],
Expand All @@ -14,9 +14,9 @@
"keytar": "^6.0.1",
"m3u8-parser": "^4.4.3",
"node-notifier": "^8.0.0",
"puppeteer": "^5.2.1",
"puppeteer": "^5.3.1",
"request": "^2.88.2",
"terminal-kit": "^1.42.0",
"terminal-kit": "^1.43.0",
"yargs": "^15.4.1"
}
}
25 changes: 13 additions & 12 deletions unicaldown.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,29 @@ function sanityChecks() {
process.exit(23);
}
if (argv.videoUrls === undefined && argv.videoUrlsFile === undefined) {
term.red("Missing URLs arguments.\n");
term.red("Missing URLs argument. Use -v or -f option.\n");
process.exit();
}
if (argv.videoUrls !== undefined && argv.videoUrlsFile !== undefined) {
term.red("Can't get URLs from both argument.\n");
term.red("Can't get URLs from both prepared arguments simultaneously. Use -v or -f option.\n");
process.exit();
}
if (argv.videoUrlsFile !== undefined)
argv.videoUrls = argv.videoUrlsFile; // merge argument
if (argv.username == "..." || argv.videoUrlsFile == "..." || argv.outputDirectory == "..." || argv.quality == "...") {
term.red("You must fill properly the easy-launcher executable before to use it. Follow the guidelines on README file.\n"); // Dummies: I can see you
process.exit();
}
if (!fs.existsSync(argv.outputDirectory)) {
if (path.isAbsolute(argv.outputDirectory) || argv.outputDirectory[0] == '~')
console.log('Creating output directory: ' + argv.outputDirectory);
else console.log('Creating output directory: ' + process.cwd() + path.sep + argv.outputDirectory);
try {
fs.mkdirSync(argv.outputDirectory, { recursive: true }); // use native API for nested directory. No recursive function needed, but compatible only with node v10 or later
} catch (e) {
term.red("Can not create nested directories. Node v10 or later is required.\n");
process.exit();
}
term.red("Can't find and get the specified video output directory. Make it and try again.\n"); // Dummies: I can see you
process.exit();
}
}

function easyLauncherCheck() {

}

function readFileToArray(path) {
path = path.substr(1,path.length-2);
if (process.platform === "win32") // check OS
Expand Down Expand Up @@ -570,7 +571,7 @@ async function extractCookies(page) {
}
*/

term.green('UnicalDown v1.7.3\nFork powered by @peppelongo96\n');
term.green('UnicalDown v1.7.4\nFork powered by @peppelongo96\n');
sanityChecks();
const videoUrls = parseVideoUrls(argv.videoUrls);
console.info('Video URLs: %s', videoUrls);
Expand Down

0 comments on commit e3a5542

Please sign in to comment.