Update ipko.com

This commit is contained in:
freearhey
2023-11-20 12:35:04 +03:00
parent 5963d491c0
commit e4fad111e6
3 changed files with 106 additions and 38 deletions

View File

@@ -26,6 +26,25 @@ module.exports = {
})
return programs
},
async channels() {
const axios = require('axios')
const data = await axios
.get(`https://www.ipko.com/epg/admin/channels.php`)
.then(r => r.data)
.catch(console.log)
let channels = []
data.element.forEach(item => {
channels.push({
lang: 'sq',
site_id: item.channel_id,
name: item.channel_name
})
})
return channels
}
}