detroitenglish / iptv-checker-module Goto Github PK
View Code? Open in Web Editor NEWCheck connectivity of the IPTV channels in an .m3u playlist file
Home Page: https://www.npmjs.com/package/iptv-checker-module
Check connectivity of the IPTV channels in an .m3u playlist file
Home Page: https://www.npmjs.com/package/iptv-checker-module
In m3u-playlists it is possible for any link to specify additional tags #EXTVLCOPT:http-referrer
and #EXTVLCOPT:http-user-agent
, like so:
#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)
#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
iptv-playlist-parser
already knows how to parse these tags and if there are any, it saves their value in the http
property:
...
{
name: 'CNN (US)',
tvg: {
id: 'cnn.us',
name: 'CNN',
language: 'English',
country: 'US',
url: 'http://195.154.221.171/epg/guide.xml.gz',
logo: 'http://example.com/logo.png'
},
group: {
title: 'News'
},
http: {
referrer: 'http://example.com/',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5)'
},
url: 'http://example.com/stream.m3u8',
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'
}
...
That is, in order to add their support to the module, we only need to pass these values to ffprobe
command:
ffprobe -headers "Referer: http://example.com/" -user_agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5)" "path/to/playlist.m3u"
I wanted to do this myself, but unfortunately I couldn't figure out the current version of the code, so I really hope that you will have time to implement it.
Maybe you know why this error could appear?
The results
seems to contain an ordinary array but the test constantly produces 'results.flat is not a function'.
iptv-checker-module/src/index.js
Line 78 in b310b4d
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.