Update ipko.com.config.js

This commit is contained in:
Aleksandr Statciuk 2021-11-09 14:37:42 +03:00
parent 6178cf1bf5
commit 1a5ff9b801

View file

@ -9,14 +9,8 @@ module.exports = {
url: function ({ date }) { url: function ({ date }) {
return `https://www.ipko.com/epg/admin/programs.php?date=${date.format('YYYY-MM-DD')}` return `https://www.ipko.com/epg/admin/programs.php?date=${date.format('YYYY-MM-DD')}`
}, },
async logo({ channel }) { logo({ channel }) {
const data = await axios return channel.logo
.post('https://www.ipko.com/epg/admin/channels.php')
.then(r => r.data)
.catch(console.log)
const item = Object.values(data.element).find(c => c.channel_id == channel.site_id)
return item ? `https://www.ipko.com/epg/logo/${item.icon}` : null
}, },
parser: function ({ content, channel, date }) { parser: function ({ content, channel, date }) {
let programs = [] let programs = []