mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 09:00:07 -04:00
Update elcinema.com
This commit is contained in:
parent
dfff803be7
commit
89d581e1c0
2 changed files with 5 additions and 15 deletions
|
@ -16,12 +16,6 @@ module.exports = {
|
||||||
|
|
||||||
return `https://elcinema.com/${lang}tvguide/${channel.site_id}/`
|
return `https://elcinema.com/${lang}tvguide/${channel.site_id}/`
|
||||||
},
|
},
|
||||||
logo({ content }) {
|
|
||||||
const $ = cheerio.load(content)
|
|
||||||
const imgSrc = $('.intro-box > .row > div.columns.large-2 > img').attr('src')
|
|
||||||
|
|
||||||
return imgSrc || null
|
|
||||||
},
|
|
||||||
parser({ content, channel, date }) {
|
parser({ content, channel, date }) {
|
||||||
const programs = []
|
const programs = []
|
||||||
const items = parseItems(content, channel, date)
|
const items = parseItems(content, channel, date)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// npx epg-grabber --config=sites/elcinema.com/elcinema.com.config.js --channels=sites/elcinema.com/elcinema.com_eg-en.channels.xml --output=.gh-pages/guides/eg-en/elcinema.com.epg.xml --days=2
|
// npx epg-grabber --config=sites/elcinema.com/elcinema.com.config.js --channels=sites/elcinema.com/elcinema.com_eg-en.channels.xml --output=.gh-pages/guides/eg-en/elcinema.com.epg.xml --days=2
|
||||||
// npx epg-grabber --config=sites/elcinema.com/elcinema.com.config.js --channels=sites/elcinema.com/elcinema.com_eg-ar.channels.xml --output=.gh-pages/guides/eg-ar/elcinema.com.epg.xml --days=2
|
// npx epg-grabber --config=sites/elcinema.com/elcinema.com.config.js --channels=sites/elcinema.com/elcinema.com_eg-ar.channels.xml --output=.gh-pages/guides/eg-ar/elcinema.com.epg.xml --days=2
|
||||||
|
|
||||||
const { parser, url, request, logo } = require('./elcinema.com.config.js')
|
const { parser, url, request } = require('./elcinema.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')
|
||||||
|
@ -26,10 +26,6 @@ it('can generate valid url', () => {
|
||||||
expect(url({ channel: channelEN })).toBe('https://elcinema.com/en/tvguide/1127/')
|
expect(url({ channel: channelEN })).toBe('https://elcinema.com/en/tvguide/1127/')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can get logo url', () => {
|
|
||||||
expect(logo({ content: contentEN })).toBe('https://media.elcinema.com/tvguide/1127_1.png')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('can parse response (en)', () => {
|
it('can parse response (en)', () => {
|
||||||
expect(parser({ date, channel: channelEN, content: contentEN })).toMatchObject([
|
expect(parser({ date, channel: channelEN, content: contentEN })).toMatchObject([
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue