mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 09:00:07 -04:00
Update cosmote.gr
This commit is contained in:
parent
b87540fbdf
commit
ce1804943c
2 changed files with 1 additions and 13 deletions
|
@ -15,12 +15,6 @@ module.exports = {
|
||||||
'DD-MM-YYYY'
|
'DD-MM-YYYY'
|
||||||
)}&_channelprogram_WAR_OTETVportlet_articleTitleUrl=${channel.site_id}`
|
)}&_channelprogram_WAR_OTETVportlet_articleTitleUrl=${channel.site_id}`
|
||||||
},
|
},
|
||||||
logo: function ({ content }) {
|
|
||||||
const $ = cheerio.load(content)
|
|
||||||
const imgSrc = $('img.channel_program-banner').attr('src')
|
|
||||||
|
|
||||||
return imgSrc ? `https://www.cosmote.gr${imgSrc}` : null
|
|
||||||
},
|
|
||||||
parser: function ({ date, content }) {
|
parser: function ({ date, content }) {
|
||||||
let programs = []
|
let programs = []
|
||||||
const items = parseItems(content)
|
const items = parseItems(content)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// npx epg-grabber --config=sites/cosmote.gr/cosmote.gr.config.js --channels=sites/cosmote.gr/cosmote.gr_gr.channels.xml --output=.gh-pages/guides/gr/cosmote.gr.epg.xml --days=2
|
// npx epg-grabber --config=sites/cosmote.gr/cosmote.gr.config.js --channels=sites/cosmote.gr/cosmote.gr_gr.channels.xml --output=.gh-pages/guides/gr/cosmote.gr.epg.xml --days=2
|
||||||
|
|
||||||
const { parser, url, logo } = require('./cosmote.gr.config.js')
|
const { parser, url } = require('./cosmote.gr.config.js')
|
||||||
const dayjs = require('dayjs')
|
const dayjs = require('dayjs')
|
||||||
const utc = require('dayjs/plugin/utc')
|
const utc = require('dayjs/plugin/utc')
|
||||||
const timezone = require('dayjs/plugin/timezone')
|
const timezone = require('dayjs/plugin/timezone')
|
||||||
|
@ -23,12 +23,6 @@ it('can generate valid url', () => {
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can generate valid logo url', () => {
|
|
||||||
expect(logo({ content })).toBe(
|
|
||||||
'https://www.cosmote.gr/portal/image/journal/article?img_id=56014332&t=1544180299920'
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('can parse response', () => {
|
it('can parse response', () => {
|
||||||
const result = parser({ content, channel, date }).map(p => {
|
const result = parser({ content, channel, date }).map(p => {
|
||||||
p.start = p.start.toJSON()
|
p.start = p.start.toJSON()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue