Update magticom.ge

This commit is contained in:
Aleksandr Statciuk
2022-02-01 05:10:52 +03:00
parent 4f31c2dc38
commit 1c78293d76
3 changed files with 120 additions and 132 deletions

View File

@@ -27,9 +27,6 @@ module.exports = {
return params
}
},
logo({ channel }) {
return channel.logo
},
parser({ content }) {
let programs = []
const items = parseItems(content)
@@ -57,13 +54,11 @@ module.exports = {
return channels.map(item => {
const $item = cheerio.load(item)
const imgSrc = $item('.tv-guide-channel-title > div > img').attr('src')
const channelId = $item('*').data('id')
return {
lang: 'ka',
site_id: channelId,
name: $item('.tv-guide-channel-title > div > div').text(),
logo: imgSrc ? `https://www.magticom.ge/${imgSrc}` : null
name: $item('.tv-guide-channel-title > div > div').text()
}
})
}