mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 09:00:07 -04:00
Update ontvtonight.com
This commit is contained in:
parent
410eb9a77f
commit
a99b4ea7a5
2 changed files with 1 additions and 15 deletions
|
@ -24,14 +24,6 @@ module.exports = {
|
||||||
|
|
||||||
return url
|
return url
|
||||||
},
|
},
|
||||||
logo: function ({ content }) {
|
|
||||||
const $ = cheerio.load(content)
|
|
||||||
const imgSrc = $(
|
|
||||||
'#content > div > div > div.span6 > img,#inner-headline > div > div > div > img'
|
|
||||||
).attr('src')
|
|
||||||
|
|
||||||
return imgSrc || null
|
|
||||||
},
|
|
||||||
parser: function ({ content, date, channel }) {
|
parser: function ({ content, date, channel }) {
|
||||||
const programs = []
|
const programs = []
|
||||||
const items = parseItems(content)
|
const items = parseItems(content)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// npx epg-grabber --config=sites/ontvtonight.com/ontvtonight.com.config.js --channels=sites/ontvtonight.com/ontvtonight.com_au.channels.xml --output=.gh-pages/guides/au/ontvtonight.com.epg.xml --days=2
|
// npx epg-grabber --config=sites/ontvtonight.com/ontvtonight.com.config.js --channels=sites/ontvtonight.com/ontvtonight.com_au.channels.xml --output=.gh-pages/guides/au/ontvtonight.com.epg.xml --days=2
|
||||||
|
|
||||||
const { parser, url, logo } = require('./ontvtonight.com.config.js')
|
const { parser, url } = require('./ontvtonight.com.config.js')
|
||||||
const dayjs = require('dayjs')
|
const dayjs = require('dayjs')
|
||||||
const utc = require('dayjs/plugin/utc')
|
const utc = require('dayjs/plugin/utc')
|
||||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||||
|
@ -20,12 +20,6 @@ it('can generate valid url', () => {
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can generate valid logo url', () => {
|
|
||||||
expect(logo({ content })).toBe(
|
|
||||||
'https://otv-us-web.s3-us-west-2.amazonaws.com/logos/guide/media/ed49cf4f-1123-4bee-9c90-a6af375af310.png'
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
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