Gathering detailed insights and metrics for iptv-playlist-parser
Gathering detailed insights and metrics for iptv-playlist-parser
Gathering detailed insights and metrics for iptv-playlist-parser
Gathering detailed insights and metrics for iptv-playlist-parser
npm install iptv-playlist-parser
Typescript
Module System
Node Version
NPM Version
74.8
Supply Chain
97.5
Quality
75.5
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
7,374,783
Last Day
115
Last Week
790
Last Month
4,413
Last Year
50,161
129 Stars
130 Commits
34 Forks
17 Watching
1 Branches
4 Contributors
Latest Version
0.13.0
Package Id
iptv-playlist-parser@0.13.0
Unpacked Size
30.74 kB
Size
6.94 kB
File Count
25
NPM Version
9.6.7
Node Version
18.17.0
Publised On
31 Oct 2023
Cumulative downloads
Total Downloads
Last day
15%
115
Compared to previous day
Last week
7.8%
790
Compared to previous week
Last month
8.8%
4,413
Compared to previous month
Last year
-95.3%
50,161
Compared to previous year
2
3
It parses IPTV playlist and converts it to a regular JavaScript object.
1npm install iptv-playlist-parser
1const parser = require('iptv-playlist-parser') 2// import parser from 'iptv-playlist-parser' 3 4const playlist = `#EXTM3U x-tvg-url="http://example.com/epg.xml.gz" 5#EXTINF:-1 tvg-id="cnn.us" tvg-name="CNN" tvg-url="http://195.154.221.171/epg/guide.xml.gz" tvg-shift="-4.5" timeshift="3" catchup="shift" catchup-days="3" catchup-source="https://m3u-server/hls-apple-s4-c494-abcdef.m3u8?utc=325234234&lutc=3123125324" tvg-logo="http://example.com/logo.png" group-title="News",CNN (US) 6#EXTGRP:News 7#EXTVLCOPT:http-referrer=http://example.com/ 8#EXTVLCOPT:http-user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) 9http://example.com/stream.m3u8` 10 11const result = parser.parse(playlist) 12 13console.log(result)
1const fs = require('fs') 2const parser = require('iptv-playlist-parser') 3 4const playlist = fs.readFileSync('playlist.m3u', 'utf8') 5 6const result = parser.parse(playlist) 7 8console.log(result)
1const https = require('https') 2const parser = require('iptv-playlist-parser') 3 4https 5 .get('https://example.com/playlist.m3u', res => { 6 let data = [] 7 8 res.on('data', chunk => { 9 data.push(chunk) 10 }) 11 12 res.on('end', () => { 13 const playlist = Buffer.concat(data).toString() 14 15 const result = parser.parse(playlist) 16 17 console.log(result) 18 }) 19 }) 20 .on('error', err => { 21 console.error(err.message) 22 })
1{ 2 header: { 3 attrs: { 4 'x-tvg-url': 'http://example.com/epg.xml.gz' 5 }, 6 raw: '#EXTM3U x-tvg-url="http://example.com/epg.xml.gz"' 7 }, 8 items: [ 9 { 10 name: 'CNN (US)', 11 tvg: { 12 id: 'cnn.us', 13 name: 'CNN', 14 url: 'http://195.154.221.171/epg/guide.xml.gz', 15 logo: 'http://example.com/logo.png', 16 rec: '', 17 shift: '-4.5' 18 }, 19 group: { 20 title: 'News' 21 }, 22 http: { 23 referrer: 'http://example.com/', 24 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5)' 25 }, 26 url: 'http://example.com/stream.m3u8', 27 raw: '#EXTINF:-1 tvg-id="cnn.us" tvg-name="CNN" tvg-url="http://195.154.221.171/epg/guide.xml.gz" tvg-shift="-4.5" timeshift="3" catchup="shift" catchup-days="3" catchup-source="https://m3u-server/hls-apple-s4-c494-abcdef.m3u8?utc=325234234&lutc=3123125324" tvg-logo="http://example.com/logo.png" group-title="News",CNN (US)\n#EXTVLCOPT:http-referrer=http://example.com/\n#EXTVLCOPT:http-user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5)\nhttp://example.com/stream.m3u8', 28 line: 2, 29 timeshift: '3', 30 catchup: { 31 type: 'shift', 32 source: 'https://m3u-server/hls-apple-s4-c494-abcdef.m3u8?utc=325234234&lutc=3123125324', 33 days: '3' 34 } 35 }, 36 //... 37 ] 38}
1npm test
If you find a bug or want to contribute to the code or documentation, you can help by submitting an issue or a pull request.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
6 existing vulnerabilities detected
Details
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn Moreesx-iptv-playlist-parser
A basic IPTV playlist parser
@iptv/playlist
An extremely fast M3U playlist parser and generator for Node and the browser.
m3u-parser-generator
Library to parse and generate m3u or m3u8 IPTV playlist files
@tunarr/playlist
An extremely fast M3U playlist parser and generator for Node and the browser.