Gathering detailed insights and metrics for esx-iptv-playlist-parser
Gathering detailed insights and metrics for esx-iptv-playlist-parser
Gathering detailed insights and metrics for esx-iptv-playlist-parser
Gathering detailed insights and metrics for esx-iptv-playlist-parser
npm install esx-iptv-playlist-parser
Typescript
Module System
Node Version
NPM Version
72.2
Supply Chain
95.1
Quality
75.1
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
340
Last Day
1
Last Week
1
Last Month
16
Last Year
105
MIT License
8 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Apr 04, 2023
Minified
Minified + Gzipped
Latest Version
0.1.1
Package Id
esx-iptv-playlist-parser@0.1.1
Unpacked Size
21.03 kB
Size
5.60 kB
File Count
10
NPM Version
9.2.0
Node Version
18.15.0
Published on
Apr 05, 2023
Cumulative downloads
Total Downloads
3
It parses IPTV playlist and converts it to a regular JavaScript object.
1npm install esx-iptv-playlist-parser
1import fs from 'fs' 2import parser from 'esx-iptv-playlist-parser' 3 4const playlist = fs.readFileSync('./playlist.m3u', { encoding: 'utf-8' }) 5const result = parser.parse(playlist) 6 7console.log(result)
Input:
#EXTM3U x-tvg-url="http://example.com/epg.xml.gz"
#EXTINF:-1 tvg-id="cnn.us" tvg-name="CNN" tvg-language="English" tvg-country="US" tvg-url="http://195.154.221.171/epg/guide.xml.gz" 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)
#EXTGRP:News
#EXTVLCOPT:http-referrer=http://example.com/
#EXTVLCOPT:http-user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5)
http://example.com/stream.m3u8
Output:
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 language: 'English', 15 country: 'US', 16 url: 'http://195.154.221.171/epg/guide.xml.gz', 17 logo: 'http://example.com/logo.png' 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-language="English" tvg-country="US" tvg-url="http://195.154.221.171/epg/guide.xml.gz" 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 timeshift: '3', 29 catchup: { 30 type: 'shift', 31 source: 'https://m3u-server/hls-apple-s4-c494-abcdef.m3u8?utc=325234234&lutc=3123125324', 32 days: '3' 33 } 34 } 35 ] 36}
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.
No security vulnerabilities found.
Last Day
0%
1
Compared to previous day
Last Week
-66.7%
1
Compared to previous week
Last Month
60%
16
Compared to previous month
Last Year
4%
105
Compared to previous year