Update clean.js

Ignore any error code except 404
This commit is contained in:
freearhey 2021-05-06 02:25:25 +03:00
parent 23d6241b03
commit 10357289d3
1 changed files with 11 additions and 6 deletions

View File

@ -66,14 +66,19 @@ async function checkStatus(playlist) {
) {
results.push(channel)
} else {
const response = await instance
await instance
.get(channel.url)
.then(() => {
results.push(channel)
})
.then(utils.sleep(config.delay))
.catch(err => {})
if (response && response.status === 200) {
.catch(err => {
if (err.response && err.response.status === 404) {
//console.error(err)
} else {
results.push(channel)
}
})
}
}