mirror of
https://github.com/iptv-org/epg
synced 2026-05-07 01:46:59 -04:00
Delete novacyprus.com
This commit is contained in:
@@ -1 +0,0 @@
|
|||||||
{"nodes":[{"datetime":"2021-11-17 06:20:00","day":"Wednesday","numDay":17,"numMonth":11,"month":"November","channelName":"Cyprus Novacinema1HD","channelLog":"https://ssl2.novago.gr/EPG/jsp/images/universal/film/logo/20200210/000100/XTV100000762/d6a2f5e0-dbc0-49c7-9843-e3161ca5ae5d.png","cid":"42","ChannelId":"614","startingTime":"06:20","endTime":"08:10","title":"Δεσμοί Αίματος","description":"Θρίλερ Μυστηρίου","duration":"109","slotDuration":"110","bref":"COMMOBLOOX","mediaItems":[{"MediaListTypeId":"6","CdnUrl":"http://cache-forthnet.secure.footprint.net/linear/3/0/305608_COMMOBLOOX_GUIDE_STILL.jpg"},{"MediaListTypeId":"7","CdnUrl":"http://cache-forthnet.secure.footprint.net/linear/3/0/305608_COMMOBLOOX_POSTER_CROSS.jpg"},{"MediaListTypeId":"8","CdnUrl":"http://cache-forthnet.secure.footprint.net/linear/3/0/305608_COMMOBLOOX_ICON_CYP.jpg"},{"MediaListTypeId":"9","CdnUrl":"http://cache-forthnet.secure.footprint.net/linear/3/0/305608_COMMOBLOOX_POSTER_CYP.jpg"},{"MediaListTypeId":"10","CdnUrl":"http://cache-forthnet.secure.footprint.net/linear/3/0/305608_COMMOBLOOX_BACKGROUND_CYP.jpg"}]},{"datetime":"2021-11-17 06:00:00","day":"Wednesday","numDay":17,"numMonth":11,"month":"November","channelName":"Cyprus Novacinema2HD","channelLog":"https://ssl2.novago.gr/EPG/jsp/images/universal/film/logo/20200210/000100/XTV100000763/24e05354-d6ad-4949-bcb3-a81d1c1d2cba.png","cid":"62","ChannelId":"653","startingTime":"06:00","endTime":"07:40","title":"Ανυπόφοροι Γείτονες","description":"Κωμωδία","duration":"93","slotDuration":"100","bref":"NEIGHBORSX","mediaItems":[{"MediaListTypeId":"7","CdnUrl":"http://cache-forthnet.secure.footprint.net/linear/3/1/312582_NEIGHBORSX_POSTER_CROSS.jpg"},{"MediaListTypeId":"8","CdnUrl":"http://cache-forthnet.secure.footprint.net/linear/3/1/312582_NEIGHBORSX_ICON_CYP.jpg"},{"MediaListTypeId":"9","CdnUrl":"http://cache-forthnet.secure.footprint.net/linear/3/1/312582_NEIGHBORSX_POSTER_CYP.jpg"},{"MediaListTypeId":"10","CdnUrl":"http://cache-forthnet.secure.footprint.net/linear/3/1/312582_NEIGHBORSX_BACKGROUND_CYP.jpg"}]}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"nodes":[],"total":0,"pages":0}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<channels>
|
|
||||||
<channel site="novacyprus.com" site_id="17" lang="el" xmltv_id="Novasports5.gr@HD">Cyprus Novasports5HD</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="53" lang="el" xmltv_id="Novalife.gr@SD">Cyprus NovalifeHD</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="81" lang="el" xmltv_id="InsightTV.nl@SD">InsightTV</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="142" lang="el" xmltv_id="Novasports4.gr@HD">Cyprus Novasports4HD</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="221" lang="el" xmltv_id="MyZenTV.fr@SD">MyZen TV</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="227" lang="el" xmltv_id="MadTV.gr@SD">Mad TV</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="381" lang="el" xmltv_id="">Discovery</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="521" lang="el" xmltv_id="HellenicParliamentTV.gr@SD">Βουλή - Τηλεόραση</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="544" lang="el" xmltv_id="Nickelodeon.gr@SD">Nickelodeon</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="570" lang="el" xmltv_id="FoxLife.gr@HD">FOX Life</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="576" lang="el" xmltv_id="SmileTV.gr@SD">Smile tv</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="580" lang="el" xmltv_id="ViasatHistory.se@SD">Viasat History HD</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="582" lang="el" xmltv_id="">MAD GREEKZ</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="584" lang="el" xmltv_id="OneChannel.gr@HD">One Channel</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="586" lang="el" xmltv_id="">Travel Channel HD</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="588" lang="el" xmltv_id="">E! Entertainment</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="609" lang="el" xmltv_id="Fox.gr@HD">FOX</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="610" lang="el" xmltv_id="CartoonitoCEE.uk@SD">Boomerang</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="614" lang="el" xmltv_id="Novacinema1.gr@SD">Cyprus Novacinema1HD</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="616" lang="el" xmltv_id="">National Geographic Wild HD</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="617" lang="el" xmltv_id="NationalGeographic.gr@HD">National Geographic HD</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="639" lang="el" xmltv_id="Novasports2.gr@HD">Cyprus Novasports2HD</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="645" lang="el" xmltv_id="AnimalPlanetEurope.uk@SD">Animal Planet</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="649" lang="el" xmltv_id="Number1TV.tr@SD">NR1 HD</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="652" lang="el" xmltv_id="Novacinema3.gr@SD">Cyprus Novacinema3HD</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="653" lang="el" xmltv_id="Novacinema2.gr@SD">Cyprus Novacinema2HD</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="667" lang="el" xmltv_id="Novacinema4.gr@SD">Cyprus Novacinema4HD</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="669" lang="el" xmltv_id="Novasports3.gr@HD">Cyprus Novasports3HD</channel>
|
|
||||||
<channel site="novacyprus.com" site_id="673" lang="el" xmltv_id="MTVLive.uk@SD">MTV Live HD</channel>
|
|
||||||
</channels>
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0
|
|
||||||
|
|
||||||
const axios = require('axios')
|
|
||||||
const dayjs = require('dayjs')
|
|
||||||
const utc = require('dayjs/plugin/utc')
|
|
||||||
const timezone = require('dayjs/plugin/timezone')
|
|
||||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
|
||||||
|
|
||||||
dayjs.extend(utc)
|
|
||||||
dayjs.extend(timezone)
|
|
||||||
dayjs.extend(customParseFormat)
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
site: 'novacyprus.com',
|
|
||||||
days: 2,
|
|
||||||
url({ date }) {
|
|
||||||
return `https://www.novacyprus.com/api/v1/tvprogram/from/${date.format('YYYYMMDD')}/to/${date
|
|
||||||
.add(1, 'd')
|
|
||||||
.format('YYYYMMDD')}`
|
|
||||||
},
|
|
||||||
parser({ content, channel }) {
|
|
||||||
let programs = []
|
|
||||||
const items = parseItems(content, channel)
|
|
||||||
items.forEach(item => {
|
|
||||||
const start = parseStart(item)
|
|
||||||
const stop = start.add(item.slotDuration, 'm')
|
|
||||||
programs.push({
|
|
||||||
title: item.title,
|
|
||||||
description: item.description,
|
|
||||||
image: parseImage(item),
|
|
||||||
start,
|
|
||||||
stop
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
return programs
|
|
||||||
},
|
|
||||||
async channels() {
|
|
||||||
const channels = await axios
|
|
||||||
.get('https://www.novacyprus.com/api/v1/guide/dailychannels')
|
|
||||||
.then(r => r.data)
|
|
||||||
.catch(console.log)
|
|
||||||
|
|
||||||
return channels.map(item => {
|
|
||||||
return {
|
|
||||||
lang: 'el',
|
|
||||||
site_id: item.ChannelId,
|
|
||||||
name: item.nameEl
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseStart(item) {
|
|
||||||
return dayjs.tz(item.datetime, 'YYYY-MM-DD HH:mm:ss', 'Asia/Nicosia')
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseImage(item) {
|
|
||||||
return item.mediaItems.length ? item.mediaItems[0].CdnUrl : null
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseItems(content, channel) {
|
|
||||||
const data = JSON.parse(content)
|
|
||||||
if (!data || !Array.isArray(data.nodes)) return []
|
|
||||||
|
|
||||||
return data.nodes.filter(i => i.ChannelId === channel.site_id)
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
const { parser, url } = require('./novacyprus.com.config.js')
|
|
||||||
const fs = require('fs')
|
|
||||||
const path = require('path')
|
|
||||||
const dayjs = require('dayjs')
|
|
||||||
const utc = require('dayjs/plugin/utc')
|
|
||||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
|
||||||
dayjs.extend(customParseFormat)
|
|
||||||
dayjs.extend(utc)
|
|
||||||
|
|
||||||
const date = dayjs.utc('2021-11-17', 'YYYY-MM-DD').startOf('d')
|
|
||||||
const channel = {
|
|
||||||
site_id: '614',
|
|
||||||
xmltv_id: 'NovaCinema1.gr'
|
|
||||||
}
|
|
||||||
|
|
||||||
it('can generate valid url', () => {
|
|
||||||
expect(url({ date })).toBe(
|
|
||||||
'https://www.novacyprus.com/api/v1/tvprogram/from/20211117/to/20211118'
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('can parse response', () => {
|
|
||||||
const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.json'))
|
|
||||||
const result = parser({ content, channel }).map(p => {
|
|
||||||
p.start = p.start.toJSON()
|
|
||||||
p.stop = p.stop.toJSON()
|
|
||||||
return p
|
|
||||||
})
|
|
||||||
|
|
||||||
expect(result).toMatchObject([
|
|
||||||
{
|
|
||||||
start: '2021-11-17T04:20:00.000Z',
|
|
||||||
stop: '2021-11-17T06:10:00.000Z',
|
|
||||||
title: 'Δεσμοί Αίματος',
|
|
||||||
description: 'Θρίλερ Μυστηρίου',
|
|
||||||
image:
|
|
||||||
'http://cache-forthnet.secure.footprint.net/linear/3/0/305608_COMMOBLOOX_GUIDE_STILL.jpg'
|
|
||||||
}
|
|
||||||
])
|
|
||||||
})
|
|
||||||
|
|
||||||
it('can handle empty guide', () => {
|
|
||||||
const result = parser({
|
|
||||||
date,
|
|
||||||
channel,
|
|
||||||
content: fs.readFileSync(path.resolve(__dirname, '__data__/no_content.json'))
|
|
||||||
})
|
|
||||||
expect(result).toMatchObject([])
|
|
||||||
})
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# novacyprus.com
|
|
||||||
|
|
||||||
https://www.novacyprus.com/en/node/32742
|
|
||||||
|
|
||||||
### Download the guide
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm run grab --- --sites=novacyprus.com
|
|
||||||
```
|
|
||||||
|
|
||||||
### Update channel list
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm run channels:parse --- --config=./sites/novacyprus.com/novacyprus.com.config.js --output=./sites/novacyprus.com/novacyprus.com.channels.xml
|
|
||||||
```
|
|
||||||
|
|
||||||
### Test
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm test --- novacyprus.com
|
|
||||||
```
|
|
||||||
Reference in New Issue
Block a user