1.0.4 • Published 7 years ago
coursehunters-downloader v1.0.4
coursehunters-downloader
A plugin for downloading videos from https://coursehunters.net
Table of Contents
Installation
md ch-loader
cd ch-loader
npm init -y
npm i coursehunters-downloaderUsage
Create index.js:
// get loader function, check "Options" section for details
const loader = require("coursehunters-downloader");
const url = "https://coursehunters.net/course/regulyarnye-vyrazheniya";
loader(url);Run script with:
node index.jsOptions
loader(courseURL, range, baseDir)- downloads video files fromcourseURLbase route and saves it as .mp4 tobaseDirfolder.rangeattribute defines it's id range. By defaultbaseDiris defined by the end ofcourseURLandrangeincludes full course video list.
Here is a list of supported range attribute configurations:
// downloads full course
loader(url);
// downloads full course to "new-course" folder
loader(url, {}, "./new-course");
// downloads videos from 2nd up to last inclusively
loader(url, {from: 2});
// downloads videos from 1st up to 5th inclusively
loader(url, {to: 5});
// downloads videos from 3rd up to 7th inclusively
loader(url, {from: 3, to: 7});
// downloads 1st, 3rd, 4th videos
loader(url, {from: [1, 3, 4]});
// effect is the same
loader(url, {to: [1, 3, 4]});Support
Please open an issue for support.
Contributing
Please contribute using Github Flow. Create a branch, add commits, and open a pull request.