Update vivacom.bg

This commit is contained in:
Aleksandr Statciuk
2022-02-01 05:56:51 +03:00
parent 28364c5837
commit 34d28dd855
2 changed files with 2 additions and 14 deletions

View File

@@ -9,20 +9,13 @@ dayjs.extend(timezone)
dayjs.extend(customParseFormat)
module.exports = {
ignore: true, // INFO: no longer available
site: 'vivacom.bg',
ignore: true, // INFO: no longer available
url({ date, channel }) {
const [page] = channel.site_id.split('#')
return `https://www.vivacom.bg/bg/tv/programa/?date=${date.format('YYYY-MM-DD')}&page=${page}`
},
logo({ content, channel }) {
const [_, channelId] = channel.site_id.split('#')
const $ = cheerio.load(content)
const imgSrc = $(`li[title="${channelId}"] > img`).attr('src')
return imgSrc ? `https://www.vivacom.bg${imgSrc}` : null
},
parser: function ({ content, channel, date }) {
let programs = []
const items = parseItems(content, channel)