Update tv.lv

This commit is contained in:
freearhey
2023-11-28 22:55:41 +03:00
parent 207af2d735
commit c147bbef22
5 changed files with 238 additions and 23 deletions

View File

@@ -25,6 +25,27 @@ module.exports = {
})
return programs
},
async channels() {
const axios = require('axios')
const groups = await axios
.get('https://www.tv.lv/data/channels/lvall')
.then(r => r.data)
.catch(console.log)
let channels = []
groups.forEach(group => {
group.channels.forEach(item => {
channels.push({
lang: 'lv',
site_id: item.slug,
name: item.name
})
})
})
return channels
}
}