mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-13 10:30:03 -04:00
Update test.js
- exclude 403 error from log (Usually occurs only if the link is geo-blocked) - skip link with rtmp protocol (Not supported by axios client)
This commit is contained in:
parent
86e061f084
commit
214108eb0a
1 changed files with 7 additions and 1 deletions
|
@ -21,7 +21,10 @@ const instance = axios.create({
|
|||
maxContentLength: 20000,
|
||||
httpsAgent: new https.Agent({
|
||||
rejectUnauthorized: false
|
||||
})
|
||||
}),
|
||||
validateStatus: function (status) {
|
||||
return (status >= 200 && status < 300) || status === 403
|
||||
}
|
||||
})
|
||||
|
||||
let stats = {
|
||||
|
@ -45,6 +48,9 @@ async function test() {
|
|||
for (let channel of playlist.channels) {
|
||||
bar.tick()
|
||||
stats.channels++
|
||||
|
||||
if (channel.url.startsWith('rtmp://')) continue
|
||||
|
||||
await instance
|
||||
.get(channel.url)
|
||||
.then(utils.sleep(config.delay))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue