w-dwload-m3u8

1.0.12 • Public • Published

w-dwload-m3u8

A download tool for m3u8.

language npm version license gzip file size npm download npm download jsdelivr download

Documentation

To view documentation or get support, visit docs.

Core

w-dwload-m3u8 is basing on N_m3u8DL-CLI.

Installation

Using npm(ES6 module):

Note: w-dwload-m3u8 is mainly dependent on lodash-es and wsemi, and should run in Windows.

npm i w-dwload-m3u8

Example:

Link: [dev source code]

import WDwloadM3u8 from './src/WDwloadM3u8.mjs'

async function test() {

    //url
    let url = `https://ikcdn01.ikzybf.com/20221214/IEiv7MwN/index.m3u8`

    //fp
    let fp = './moon01.mp4'

    //funProg
    let funProg = (prog, nn, na) => {
        console.log('prog', `${prog.toFixed(2)}%`, nn, na)
    }

    //WDwloadM3u8
    await WDwloadM3u8(url, fp, {
        clean: true, //單一程序執行時, 事先清除之前暫存檔, 減少浪費硬碟空間
        funProg,
    })

    console.log('done:', fp)
}
test()
    .catch((err) => {
        console.log('catch', err)
    })
// prog 0.14% 1 708
// prog 1.41% 10 708
// ...
// prog 99.86% 707 708
// prog 100.00% 708 708
// done: ./moon01.mp4

Package Sidebar

Install

npm i w-dwload-m3u8

Weekly Downloads

6

Version

1.0.12

License

MIT

Unpacked Size

14.2 MB

Total Files

56

Last publish

Collaborators

  • semisphere