Merge pull request #7476 from iptv-org/patch-2022.06

Patch 2022.06
This commit is contained in:
Aleksandr Statciuk 2022-06-08 21:13:21 +03:00 committed by GitHub
commit 9e781183e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 2104 additions and 2084 deletions

52
package-lock.json generated
View File

@ -12,7 +12,7 @@
"commander": "^8.3.0",
"dayjs": "^1.10.7",
"fs-extra": "^10.0.0",
"iptv-checker": "^0.22.0",
"iptv-checker": "^0.24.1",
"iptv-playlist-parser": "^0.11.0",
"jest": "^27.5.1",
"jest-expect-message": "^1.0.2",
@ -1085,6 +1085,11 @@
"follow-redirects": "^1.14.0"
}
},
"node_modules/axios-curlirize": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/axios-curlirize/-/axios-curlirize-1.3.7.tgz",
"integrity": "sha512-csSsuMyZj1dv1fL0zRPnDAHWrmlISMvK+wx9WJI/igRVDT4VMgbf2AVenaHghFLfI1nQijXUevYEguYV6u5hjA=="
},
"node_modules/babel-jest": {
"version": "27.5.1",
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz",
@ -2001,17 +2006,18 @@
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"node_modules/iptv-checker": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/iptv-checker/-/iptv-checker-0.22.0.tgz",
"integrity": "sha512-94dnViRK9DaegiVkRR1BGzsDvfo+t4ZkQJgVvSrzbcpvKaNnMUHHtm2hlwKejfz+A/Ci/wBVWkcVe0pZB1KODQ==",
"version": "0.24.1",
"resolved": "https://registry.npmjs.org/iptv-checker/-/iptv-checker-0.24.1.tgz",
"integrity": "sha512-797Vy75UwFFNQhdyaZmZxUHEdJOA5UQdk3sJ/CWMWi/Q4AFwEmL3VtjuzXsH7peswnPcGfFDLI6IXu+IxSTURw==",
"dependencies": {
"axios": "^0.21.1",
"axios-curlirize": "^1.3.7",
"colors": "^1.4.0",
"command-exists": "^1.2.9",
"commander": "^2.20.0",
"dateformat": "^3.0.3",
"get-stdin": "^7.0.0",
"iptv-playlist-parser": "^0.5.4",
"iptv-playlist-parser": "^0.11.0",
"jest": "^27.0.6",
"lodash.chunk": "^4.2.0",
"progress": "^2.0.3",
@ -2029,11 +2035,6 @@
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
},
"node_modules/iptv-checker/node_modules/iptv-playlist-parser": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/iptv-playlist-parser/-/iptv-playlist-parser-0.5.4.tgz",
"integrity": "sha512-sgzJ83LFLJQX8RhnWvjxEyeYwelLf+vPdNLWYwlozkmSl8IxU/y2qBxyGCvyqCKpIQDdU35wkrZ3k1nMpI3KGQ=="
},
"node_modules/iptv-playlist-parser": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/iptv-playlist-parser/-/iptv-playlist-parser-0.11.0.tgz",
@ -3151,9 +3152,9 @@
}
},
"node_modules/minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"node_modules/ms": {
"version": "2.1.2",
@ -5065,6 +5066,11 @@
"follow-redirects": "^1.14.0"
}
},
"axios-curlirize": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/axios-curlirize/-/axios-curlirize-1.3.7.tgz",
"integrity": "sha512-csSsuMyZj1dv1fL0zRPnDAHWrmlISMvK+wx9WJI/igRVDT4VMgbf2AVenaHghFLfI1nQijXUevYEguYV6u5hjA=="
},
"babel-jest": {
"version": "27.5.1",
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz",
@ -5736,17 +5742,18 @@
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"iptv-checker": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/iptv-checker/-/iptv-checker-0.22.0.tgz",
"integrity": "sha512-94dnViRK9DaegiVkRR1BGzsDvfo+t4ZkQJgVvSrzbcpvKaNnMUHHtm2hlwKejfz+A/Ci/wBVWkcVe0pZB1KODQ==",
"version": "0.24.1",
"resolved": "https://registry.npmjs.org/iptv-checker/-/iptv-checker-0.24.1.tgz",
"integrity": "sha512-797Vy75UwFFNQhdyaZmZxUHEdJOA5UQdk3sJ/CWMWi/Q4AFwEmL3VtjuzXsH7peswnPcGfFDLI6IXu+IxSTURw==",
"requires": {
"axios": "^0.21.1",
"axios-curlirize": "^1.3.7",
"colors": "^1.4.0",
"command-exists": "^1.2.9",
"commander": "^2.20.0",
"dateformat": "^3.0.3",
"get-stdin": "^7.0.0",
"iptv-playlist-parser": "^0.5.4",
"iptv-playlist-parser": "^0.11.0",
"jest": "^27.0.6",
"lodash.chunk": "^4.2.0",
"progress": "^2.0.3",
@ -5757,11 +5764,6 @@
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
},
"iptv-playlist-parser": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/iptv-playlist-parser/-/iptv-playlist-parser-0.5.4.tgz",
"integrity": "sha512-sgzJ83LFLJQX8RhnWvjxEyeYwelLf+vPdNLWYwlozkmSl8IxU/y2qBxyGCvyqCKpIQDdU35wkrZ3k1nMpI3KGQ=="
}
}
},
@ -6617,9 +6619,9 @@
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"ms": {
"version": "2.1.2",

View File

@ -32,7 +32,7 @@
"commander": "^8.3.0",
"dayjs": "^1.10.7",
"fs-extra": "^10.0.0",
"iptv-checker": "^0.22.0",
"iptv-checker": "^0.24.1",
"iptv-playlist-parser": "^0.11.0",
"jest": "^27.5.1",
"jest-expect-message": "^1.0.2",

View File

@ -5,7 +5,7 @@ const options = program
.requiredOption('-c, --cluster-id <cluster-id>', 'The ID of cluster to load', parser.parseNumber)
.option('-t, --timeout <timeout>', 'Set timeout for each request', parser.parseNumber, 60000)
.option('-d, --delay <delay>', 'Set delay for each request', parser.parseNumber, 0)
.option('--debug', 'Enable debug mode')
.option('--debug', 'Enable debug mode', false)
.parse(process.argv)
.opts()
@ -48,7 +48,7 @@ async function main() {
if (!result.error) {
logger.info(message)
} else {
logger.info(`${message} (${result.error})`)
logger.info(`${message} (${result.error.message})`)
}
const output = {
_id: result._id,

View File

@ -142,10 +142,12 @@ function parseMediaInfo(streams) {
function parseStatus(error) {
if (!error) return 'online'
switch (error) {
case 'Operation timed out':
switch (error.code) {
case 'HTTP_REQUEST_TIMEOUT':
case 'FFMPEG_PROCESS_TIMEOUT':
return 'timeout'
case 'Server returned 403 Forbidden (access denied)':
case 'HTTP_FORBIDDEN':
case 'HTTP_UNAVAILABLE_FOR_LEGAL_REASONS':
return 'blocked'
default:
return 'error'

View File

@ -10,7 +10,7 @@ checker.check = async function (item, config) {
_id: item._id,
url: item.url,
http: item.http,
error: !result.status.ok ? result.status.reason : null,
error: !result.status.ok ? { code: result.status.code, message: result.status.message } : null,
streams: result.status.ok ? result.status.metadata.streams : [],
requests: result.status.ok ? result.status.metadata.requests : []
}

View File

@ -1,2 +1,2 @@
{"_id":"2ST8btby3mmsgPF0","error":"Operation timed out","streams":[],"requests":[]}
{"_id":"I6cjG2xCBRFFP4sz","error":"Operation timed out","streams":[],"requests":[]}
{"_id":"2ST8btby3mmsgPF0","error":{"code":"HTTP_REQUEST_TIMEOUT","message":"HTTP 408 Request Timeout"},"streams":[],"requests":[]}
{"_id":"I6cjG2xCBRFFP4sz","error":{"code":"HTTP_REQUEST_TIMEOUT","message":"HTTP 408 Request Timeout"},"streams":[],"requests":[]}

View File

@ -1,6 +1,6 @@
{"_id":"2ST8btby3mmsgPF0","error":"Operation timed out","streams":[],"requests":[]}
{"_id":"I6cjG2xCBRFFP4sz","error":"No streams found","streams":[],"requests":[]}
{"_id":"3TbieV1ptnZVCIdn","error":"Server returned 403 Forbidden (access denied)","streams":[],"requests":[]}
{"_id":"cFFpFVzSn6xFMUF3","error":"Server returned 404 Not Found","streams":[],"requests":[]}
{"_id":"2ST8btby3mmsgPF0","error":{"code":"HTTP_REQUEST_TIMEOUT","message":"HTTP 408 Request Timeout"},"streams":[],"requests":[]}
{"_id":"I6cjG2xCBRFFP4sz","error":{"code":"FFMPEG_STREAMS_NOT_FOUND","message":"FFMPEG Streams Not Found"},"streams":[],"requests":[]}
{"_id":"3TbieV1ptnZVCIdn","error":{"code":"HTTP_FORBIDDEN","message":"HTTP 403 Forbidden"},"streams":[],"requests":[]}
{"_id":"cFFpFVzSn6xFMUF3","error":{"code":"HTTP_NOT_FOUND","message":"HTTP 404 Not Found"},"streams":[],"requests":[]}
{"_id":"u7iyA6cjtf1iWWAZ","error":null,"streams":[{"index":0,"codec_name":"timed_id3","codec_long_name":"timed ID3 metadata","codec_type":"data","codec_tag_string":"ID3 ","codec_tag":"0x20334449","r_frame_rate":"0/0","avg_frame_rate":"0/0","time_base":"1/90000","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0},"tags":{"variant_bitrate":"1226543"}},{"index":1,"codec_name":"h264","codec_long_name":"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","profile":"Constrained Baseline","codec_type":"video","codec_tag_string":"[27][0][0][0]","codec_tag":"0x001b","width":1280,"height":720,"coded_width":1280,"coded_height":720,"closed_captions":0,"has_b_frames":3,"sample_aspect_ratio":"1:1","display_aspect_ratio":"16:9","pix_fmt":"yuv420p","level":31,"color_range":"tv","chroma_location":"left","refs":1,"is_avc":"false","nal_length_size":"0","r_frame_rate":"25/1","avg_frame_rate":"25/1","time_base":"1/90000","start_pts":5612807216,"start_time":"62364.524622","bits_per_raw_sample":"8","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0},"tags":{"variant_bitrate":"726543"}},{"index":2,"codec_name":"aac","codec_long_name":"AAC (Advanced Audio Coding)","profile":"LC","codec_type":"audio","codec_tag_string":"[15][0][0][0]","codec_tag":"0x000f","sample_fmt":"fltp","sample_rate":"48000","channels":2,"channel_layout":"stereo","bits_per_sample":0,"r_frame_rate":"0/0","avg_frame_rate":"0/0","time_base":"1/90000","start_pts":5612806046,"start_time":"62364.511622","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0},"tags":{"variant_bitrate":"1226543"}},{"index":3,"codec_name":"h264","codec_long_name":"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","profile":"Constrained Baseline","codec_type":"video","codec_tag_string":"[27][0][0][0]","codec_tag":"0x001b","width":1280,"height":720,"coded_width":1280,"coded_height":720,"closed_captions":0,"has_b_frames":3,"sample_aspect_ratio":"1:1","display_aspect_ratio":"16:9","pix_fmt":"yuv420p","level":31,"color_range":"tv","chroma_location":"left","refs":1,"is_avc":"false","nal_length_size":"0","r_frame_rate":"25/1","avg_frame_rate":"25/1","time_base":"1/90000","start_pts":5612807216,"start_time":"62364.524622","bits_per_raw_sample":"8","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0},"tags":{"variant_bitrate":"2226543"}}],"requests":[{"method":"GET","url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/playlist.m3u8","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"close","Host":"forerunnerrtmp.livestreamingcdn.com","Icy-MetaData":"1"}},{"method":"GET","url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/chunklist_w2083911960.m3u8","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"keep-alive","Host":"forerunnerrtmp.livestreamingcdn.com","Icy-MetaData":"1"}},{"method":"GET","url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/media_w2083911960_25312.ts","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"keep-alive","Host":"forerunnerrtmp.livestreamingcdn.com","Icy-MetaData":"1"}},{"method":"GET","url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/media_w2083911960_25313.ts","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"keep-alive","Host":"forerunnerrtmp.livestreamingcdn.com","Icy-MetaData":"1"}}]}
{"_id":"WTbieV1ptnZVCIdn","error":null,"streams":[{"index":0,"codec_name":"h264","codec_long_name":"H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","profile":"Baseline","codec_type":"video","codec_tag_string":"[27][0][0][0]","codec_tag":"0x001b","width":1024,"height":576,"coded_width":1024,"coded_height":576,"closed_captions":0,"has_b_frames":0,"sample_aspect_ratio":"1:1","display_aspect_ratio":"16:9","pix_fmt":"yuv420p","level":31,"color_range":"tv","color_space":"bt709","color_transfer":"bt709","color_primaries":"bt709","chroma_location":"left","refs":1,"is_avc":"false","nal_length_size":"0","r_frame_rate":"25/1","avg_frame_rate":"25/1","time_base":"1/90000","start_pts":7878865078,"start_time":"87542.945311","bits_per_raw_sample":"8","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0},"tags":{"variant_bitrate":"0"}},{"index":1,"codec_name":"aac","codec_long_name":"AAC (Advanced Audio Coding)","profile":"HE-AAC","codec_type":"audio","codec_tag_string":"[15][0][0][0]","codec_tag":"0x000f","sample_fmt":"fltp","sample_rate":"48000","channels":2,"channel_layout":"stereo","bits_per_sample":0,"r_frame_rate":"0/0","avg_frame_rate":"0/0","time_base":"1/90000","start_pts":7878863698,"start_time":"87542.929978","disposition":{"default":0,"dub":0,"original":0,"comment":0,"lyrics":0,"karaoke":0,"forced":0,"hearing_impaired":0,"visual_impaired":0,"clean_effects":0,"attached_pic":0,"timed_thumbnails":0},"tags":{"variant_bitrate":"0"}}],"requests":[{"method":"GET","url":"https://master.starmena-cloud.com/hls/libyas.m3u8","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"close","Host":"master.starmena-cloud.com","Icy-MetaData":"1"}},{"method":"GET","url":"https://master.starmena-cloud.com/hls/libyas-432343.ts","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"keep-alive","Host":"master.starmena-cloud.com","Icy-MetaData":"1"}},{"method":"GET","url":"https://master.starmena-cloud.com/hls/libyas-432344.ts","headers":{"User-Agent":"Lavf/58.76.100","Accept":"*/*","Range":"bytes=0-","Connection":"keep-alive","Host":"master.starmena-cloud.com","Icy-MetaData":"1"}}]}

4108
yarn.lock

File diff suppressed because it is too large Load Diff