{"id":13563965,"url":"https://github.com/nurrony/hlsdownloader","last_synced_at":"2026-02-02T20:21:59.673Z","repository":{"id":32144131,"uuid":"35716947","full_name":"nurrony/hlsdownloader","owner":"nurrony","description":"Downloads HLS Playlist file and TS chunks. You can use it for content pre-fetching from CDN to Edge Server for your end viewers.","archived":false,"fork":false,"pushed_at":"2026-01-09T06:43:17.000Z","size":1402,"stargazers_count":121,"open_issues_count":1,"forks_count":21,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-12T18:38:29.867Z","etag":null,"topics":["cdn-priming","chunk","download","download-playlists","downloader","hls","hlsdownloader","live","livestream","streaming","streaming-video"],"latest_commit_sha":null,"homepage":"https://nurrony.github.io/hlsdownloader/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nurrony.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-05-16T09:04:28.000Z","updated_at":"2026-01-09T06:42:28.000Z","dependencies_parsed_at":"2024-04-17T06:34:59.160Z","dependency_job_id":"bd24be2d-6fa5-40c2-94c1-9c1c0378acdd","html_url":"https://github.com/nurrony/hlsdownloader","commit_stats":{"total_commits":211,"total_committers":8,"mean_commits":26.375,"dds":0.09952606635071093,"last_synced_commit":"049ebd43670fa277d07d7221f487db731a2c2be6"},"previous_names":["nmrony/hlsdownloader"],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/nurrony/hlsdownloader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurrony%2Fhlsdownloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurrony%2Fhlsdownloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurrony%2Fhlsdownloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurrony%2Fhlsdownloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nurrony","download_url":"https://codeload.github.com/nurrony/hlsdownloader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurrony%2Fhlsdownloader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29019459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T18:51:31.335Z","status":"ssl_error","status_checked_at":"2026-02-02T18:49:20.777Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cdn-priming","chunk","download","download-playlists","downloader","hls","hlsdownloader","live","livestream","streaming","streaming-video"],"created_at":"2024-08-01T13:01:25.076Z","updated_at":"2026-02-02T20:21:59.638Z","avatar_url":"https://github.com/nurrony.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"\u003cdiv align=\"center\"\u003e\n\n[![HLSDownloader](./assets/logo.png)](https://nurrony.github.io/hlsdownloader/)\u003cbr /\u003e\n\n\u003c/div\u003e\n\n\u003cp align=\"center\" style=\"font-size: 18px;\"\u003e\n  Downloads HLS Playlist file and TS chunks. You can use it for content pre-fetching from CDN to Edge Server for your end viewers.\n\u003c/p\u003e\n\n\u003cp align=\"center\" style=\"font-size: 18px;\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/hlsdownloader\"\u003e\u003cb\u003eNPM\u003c/b\u003e\u003c/a\u003e • \u003ca href=\"https://nurrony.github.io/hlsdownloader/\"\u003e\u003cb\u003eDocumentation\u003c/b\u003e\u003c/a\u003e •  \u003ca href=\"https://github.com/nurrony/hlsdownloader\"\u003e\u003cb\u003eGitHub\u003c/b\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Version](https://img.shields.io/npm/v/hlsdownloader.svg?style=flat-square)](https://www.npmjs.com/package/hlsdownloader)\n[![Node](https://img.shields.io/badge/node-%3E%3D20-blue.svg?style=flat-square)](https://www.npmjs.com/package/hlsdownloader)\n[![CI](https://github.com/nurrony/hlsdownloader/actions/workflows/test.yaml/badge.svg?style=flat-square)](https://github.com/nurrony/hlsdownloader/actions/workflows/test.yaml)\n[![Coverage Status](https://coveralls.io/repos/github/nurrony/hlsdownloader/badge.svg?branch=main)](https://coveralls.io/github/nurrony/hlsdownloader?branch=main)\n[![Documentation](https://img.shields.io/badge/documentation-yes-brightgreen.svg?style=flat-square)](https://nurrony.github.io/hlsdownloader)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg?style=flat-square) ](https://github.com/nurrony/hlsdownloader/graphs/commit-activity)\n[![License: MIT](https://img.shields.io/github/license/nurrony/hlsdownloader?style=flat-square) ](https://github.com/nurrony/hlsdownloader/blob/main/LICENSE)\n[![Semver: Badge](https://img.shields.io/badge/%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079?style=flat-square) ](https://npmjs.com/package/hlsdownloader)\n[![Downloads: HLSDownloader](https://img.shields.io/npm/dm/hlsdownloader.svg?style=flat-square) ](https://npm-stat.com/charts.html?package=hlsdownloader)\n[![Min Bundle Size: HLSDownloader](https://img.shields.io/bundlephobia/minzip/hlsdownloader?style=flat-square) ](https://bundlephobia.com/package/hlsdownloader@latest)\n[![Known Vulnerabilities](https://snyk.io/test/github/nurrony/hlsdownloader/badge.svg)](https://snyk.io/test/github/nurrony/hlsdownloader)\n\u003cbr /\u003e \u003cbr /\u003e\n\n\u003c/div\u003e\n\n\u003e ⚠️\n\u003e \u003cstrong\u003eThis package is native [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) and no longer provides a CommonJS export. If your project uses CommonJS, you will have to [convert to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). Please don't open issues for questions regarding CommonJS / ESM.\u003c/strong\u003e\n\n\u003e ⚠️\n\u003e \u003cstrong\u003eHLSDownloader `v2.x.x` is no longer maintained and we will not accept any backport requests.\u003c/strong\u003e\n\n## Features\n\n- Retryable\n- Promise Based\n- Support for HTTP/2\n- Overwrite protection\n- Support for custom HTTP Headers\n- Support for custom HTTP Client\n- Bring your own progress bar during download\n- Concurrent download segments with multiple http connections\n\n## Prerequisites\n\n- node \u003e=20.x.x\n\n## Installation\n\nIt is pretty straight forward\n\n```sh\n# using npm\nnpm install --save hlsdownloader\n# or with yarn\nyarn add hlsdownloader\n# or pnpm\npnpm install hlsdownloader\n```\n\n## How to use\n\nThe `destination` field is optional. If a destination is not specified, the content is retrieved directly from the origin. This functionality may also be used to pre-fetch content from the CDN for end viewers. If the download of any `TS` or `M3U8` variant fails, the process continues with the remaining downloads and provides a consolidated report upon completion.\n\nIt's simple as below with.\n\n```js\nimport HLSDownloader from 'hlsdownloader';\n\nconst options = {\n  playlistURL: 'http://example.com/path/to/your/playlist.m3u8', // change it\n  destination: '/tmp', // (optional: default '')\n  concurrency: 10, // (optional: default = 1),\n  overwrite: true, // (optional: default = false)\n  // (optional: default = null)\n  onData: function (data) {\n    console.log(data); // {url: \"\u003curl-just-downloaded\u003e\", totalItems: \"\u003ctotal-items-to-download\u003e\", path: \"\u003cabsolute-path-of-download-loation\u003e\"}\n  },\n  // (optional: default = null)\n  onError: function (error) {\n    console.log(error); // { url: \"\u003cURLofItem\u003e\", name: \"\u003cnameOfError\u003e\", message: \"human readable message of error\" }\n  },\n  // you can pass supported ky options (optional) (see example.js)\n};\nconst downloader = new HLSDownloader(options);\ndownloader.startDownload().then(response =\u003e console.log(response));\n```\n\n\u003e ℹ️ Check [example.js](example.js) for working example\n\n```js\n// on success\n{\n  total: \u003cnumber\u003e,\n  playlistURL: 'your playlist url'\n  message: 'Downloaded successfully',\n}\n\n// on partial download\n{\n  total: \u003cnumber\u003e,\n  playlistURL: 'your playlist url',\n  message: 'Download done with some errors',\n  errors: [\n    {\n      name: 'InvalidPlaylist',\n      message: 'Playlist parsing is not successful'\n      url: 'https://cnd.hls-server.test/playlist.m3u8'\n    }\n  ] // items url that is skipped or could not downloaded for error\n}\n```\n\n## Advance Usage\n\nHLSDownloader supports all [Ky API](https://github.com/sindresorhus/ky?tab=readme-ov-file#api) except these options given below\n\n- uri\n- url\n- json\n- form\n- body\n- method\n- setHost\n- isStream\n- parseJson\n- prefixUrl\n- cookieJar\n- playlistURL\n- concurrency\n- allowGetBody\n- stringifyJson\n- methodRewriting\n\nIt also disable retry failed request that you can easily override\n\n## Running Tests\n\n```sh\nnpm test\n```\n\nTo run it on watch mode\n\n```sh\nnpm run test:watch\n```\n\n## Generate Documentations\n\n```sh\nnpm docs:gen\n```\n\n## Authors\n\n👤 **Nur Rony**\n\n- Website: [nurrony.github.io](https://nurrony.github.io)\n- Twitter: [@nmrony](https://twitter.com/nmrony)\n- Github: [@nurrony](https://github.com/nurrony)\n- LinkedIn: [@nmrony](https://linkedin.com/in/nmrony)\n\n## Contributing\n\nContributions, issues and feature requests are welcome!\u003cbr /\u003eFeel free to check [issues page](https://github.com/nurrony/hlsdownloader/issues). You can also take a look at the [contributing guide](https://github.com/nurrony/hlsdownloader/blob/main/CONTRIBUTING.md).\n\n## Show your support\n\nGive a ⭐️ if this project helped you!. I will be grateful if you all help me to improve this package by giving your suggestions, feature request and pull requests. I am all ears!!\n\n## Special Thanks to\n\n- [Ky Team](https://www.npmjs.com/package/ky)\n\n## License\n\nCopyright © 2026 [Nur Rony](https://github.com/nurrony).\u003cbr /\u003e\nThis project is [MIT](https://github.com/nurrony/hlsdownloader/blob/main/LICENSE) licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnurrony%2Fhlsdownloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnurrony%2Fhlsdownloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnurrony%2Fhlsdownloader/lists"}