mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 17:10:07 -04:00
Delete sites/ipko.com directory
This commit is contained in:
parent
14c4ca3916
commit
5d874ea163
4 changed files with 0 additions and 210 deletions
|
@ -1,86 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<channels>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="256">Radio Televizioni 21 HD</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="270">Rrokum TV</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="271">Rrokum HD</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="284">Plus HD</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="292">Fox Life</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="300">National Geographic</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="304">musicAL</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="308">Fashion TV</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="309">Digi Gold</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="317">Albanian Screen</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="321">E TV</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="322">ON TV</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="365">TV Festina</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="373">RTL</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="375">RTL 2</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="377">N-TV</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="381">Al Jazeera</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="387">EuroNews</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="388">B92 Info</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="391">DW TV</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="403">Animal Planet HD</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="407">Tribuna</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="409">First Channel</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="410">RTK 1 HD</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="411">Top Channel HD</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="412">Nickelodeon HD</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="416">Fox</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="419">Travel Channel</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="420">Fine Living</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="422">ID Xtra HD</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="424">Rai News</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="427">Wedding Channel</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="" site_id="428">TVSH</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="21Junior.xk" site_id="281">21 Junior</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="21Popullore.xk" site_id="324">21 Popullore</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="24Kitchen.rs" site_id="418">24 Kitchen</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="ABCNews.al" site_id="269">ABC News</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="Alsat.mk" site_id="319">Alsat M</channel>
|
|
||||||
<channel site="ipko.com" lang="en" xmltv_id="BabyTV.uk" site_id="413">Baby TV</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="BangBang.al" site_id="274">Bang Bang</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="BBCNewsEurope.uk" site_id="386">BBC World</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="BoomerangCEE.uk" site_id="279">Boomerang</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="CNNInternationalEurope.us" site_id="385">CNN int</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="Cufo.al" site_id="275">Cufo TV</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="DiscoveryChannel.bg" site_id="417">Discovery Channel</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="DiscoveryScience.us" site_id="421">Discovery Science HD</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="Eurosport1.fr" site_id="351">EuroSport</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="ExplorerHistori.al" site_id="296">EXP Histori</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="ExplorerNatyra.al" site_id="298">EXP Natyra</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="ExplorerShkence.al" site_id="295">EXP Shkence</channel>
|
|
||||||
<channel site="ipko.com" lang="en" xmltv_id="FilmAksion.al" site_id="291">Film Aksion</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="FilmAutor.al" site_id="414">Film Autor</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="FilmDrame.al" site_id="290">Film Drame</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="FilmDyHD.al" site_id="283">Film Dy HD</channel>
|
|
||||||
<channel site="ipko.com" lang="en" xmltv_id="FilmHits.al" site_id="415">Film Hits</channel>
|
|
||||||
<channel site="ipko.com" lang="en" xmltv_id="FilmKomedi.al" site_id="285">Film Komedi</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="FilmNjeHD.al" site_id="282">Film Nje HD</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="FilmThriller.al" site_id="289">Film Thriller</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="Hayat.ba" site_id="352">Hayat TV</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="JuniorTV.al" site_id="276">Junior TV</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="KlanKosova.xk" site_id="254">Klan Kosova</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="Kohavision.xk" site_id="312">Kohavision</channel>
|
|
||||||
<channel site="ipko.com" lang="en" xmltv_id="MTVLive.uk" site_id="303">MTV Live HD</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="MyMusic.al" site_id="273">My Music</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="NationalGeographic.uk" site_id="299">Nat Geo HD</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="News24.al" site_id="316">News 24</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="OraNews.al" site_id="315">Ora News</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="PeaceTVEnglish.ae" site_id="383">Peace TV</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="Rai1.it" site_id="378">Rai 1</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="Rai2.it" site_id="379">Rai 2</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="Rai3.it" site_id="380">Rai 3</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="RTK1.xk" site_id="402">Radio Televizioni i Kosoves</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="RTV21.xk" site_id="255">Radio Televizioni 21</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="RTVDukagjini.xk" site_id="404">TV Dukagjini</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="Stinet.al" site_id="406">Stinet</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="STVFolk.al" site_id="426">STV Folk</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="SuperSonicTV.al" site_id="425">SuperSonic TV</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="TopChannel.al" site_id="405">Top Channel</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="TopNews.al" site_id="408">Top News</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="TVArta.xk" site_id="423">TV Arta</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="TVKlan.al" site_id="259">Klan TV</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="TVKlanHD.al" site_id="260">Klan TV HD</channel>
|
|
||||||
<channel site="ipko.com" lang="sq" xmltv_id="TVPrizreni.xk" site_id="364">TV Prizren</channel>
|
|
||||||
</channels>
|
|
|
@ -1,65 +0,0 @@
|
||||||
const dayjs = require('dayjs')
|
|
||||||
const utc = require('dayjs/plugin/utc')
|
|
||||||
|
|
||||||
dayjs.extend(utc)
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
site: 'ipko.com',
|
|
||||||
days: 2,
|
|
||||||
url: function ({ date }) {
|
|
||||||
return `https://www.ipko.com/epg/admin/programs.php?date=${date.format('YYYY-MM-DD')}`
|
|
||||||
},
|
|
||||||
parser: function ({ content, channel, date }) {
|
|
||||||
let programs = []
|
|
||||||
const items = parseItems(content, channel)
|
|
||||||
items.forEach(item => {
|
|
||||||
const start = parseStart(item, date)
|
|
||||||
const stop = start.add(item.duration / 3, 'm')
|
|
||||||
|
|
||||||
programs.push({
|
|
||||||
title: item.program_name,
|
|
||||||
description: item.description,
|
|
||||||
category: item.category,
|
|
||||||
start: start.toString(),
|
|
||||||
stop: stop.toString()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
return programs
|
|
||||||
},
|
|
||||||
async channels() {
|
|
||||||
const axios = require('axios')
|
|
||||||
|
|
||||||
const data = await axios
|
|
||||||
.get(`https://www.ipko.com/epg/admin/channels.php`)
|
|
||||||
.then(r => r.data)
|
|
||||||
.catch(console.log)
|
|
||||||
|
|
||||||
let channels = []
|
|
||||||
data.element.forEach(item => {
|
|
||||||
channels.push({
|
|
||||||
lang: 'sq',
|
|
||||||
site_id: item.channel_id,
|
|
||||||
name: item.channel_name
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
return channels
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseStart(item, date) {
|
|
||||||
const time = `${date.format('YYYY-MM-DD')} ${item.date}`
|
|
||||||
|
|
||||||
return dayjs.utc(time, 'YYYY-MM-DD HH:mm:ss')
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseItems(content, channel) {
|
|
||||||
const data = JSON.parse(content)
|
|
||||||
const arr = Object.values(data.element)
|
|
||||||
const items = arr.find(el => {
|
|
||||||
return el[0] && el[0].channel_id == channel.site_id
|
|
||||||
})
|
|
||||||
|
|
||||||
return Array.isArray(items) ? items : []
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
const { parser, url } = require('./ipko.com.config.js')
|
|
||||||
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-10-24', 'YYYY-MM-DD').startOf('d')
|
|
||||||
const channel = {
|
|
||||||
site_id: '406',
|
|
||||||
xmltv_id: 'RTK1.xk'
|
|
||||||
}
|
|
||||||
const content =
|
|
||||||
'{"element":{"1":[{"id":6367,"channel_id":406,"program_name":"Beautiful People 13","name_short":"","description":"Lin largohet nga Nju Meksiko për t\'u vendosur në Nju Jork e për t\'ia nisur nga fillimi: një punë të re, shtëpi të re dhe njohje të reja. Bashkë me të janë vajzat e saj, Sofia, një 16 vjeçare që shkëlqen në shkollë, dhe Kareni, 20 vjeçare, që do të bë","category":"Sezoni I","duration":150,"day":"Sun","left_distanc":165,"date":"00:55:00"}]}}'
|
|
||||||
|
|
||||||
it('can generate valid url', () => {
|
|
||||||
const result = url({ date })
|
|
||||||
expect(result).toBe('https://www.ipko.com/epg/admin/programs.php?date=2021-10-24')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('can parse response', () => {
|
|
||||||
const result = parser({ date, channel, content })
|
|
||||||
expect(result).toMatchObject([
|
|
||||||
{
|
|
||||||
start: 'Sun, 24 Oct 2021 00:55:00 GMT',
|
|
||||||
stop: 'Sun, 24 Oct 2021 01:45:00 GMT',
|
|
||||||
title: 'Beautiful People 13',
|
|
||||||
description:
|
|
||||||
"Lin largohet nga Nju Meksiko për t'u vendosur në Nju Jork e për t'ia nisur nga fillimi: një punë të re, shtëpi të re dhe njohje të reja. Bashkë me të janë vajzat e saj, Sofia, një 16 vjeçare që shkëlqen në shkollë, dhe Kareni, 20 vjeçare, që do të bë",
|
|
||||||
category: 'Sezoni I'
|
|
||||||
}
|
|
||||||
])
|
|
||||||
})
|
|
||||||
|
|
||||||
it('can handle empty guide', () => {
|
|
||||||
const result = parser({ date, channel, content: '{"element":{"1":[{"no":"no"}]}}' })
|
|
||||||
expect(result).toMatchObject([])
|
|
||||||
})
|
|
|
@ -1,21 +0,0 @@
|
||||||
# ipko.com
|
|
||||||
|
|
||||||
https://www.ipko.com/epg/
|
|
||||||
|
|
||||||
### Download the guide
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm run grab --- --site=ipko.com
|
|
||||||
```
|
|
||||||
|
|
||||||
### Update channel list
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm run channels:parse --- --config=./sites/ipko.com/ipko.com.config.js --output=./sites/ipko.com/ipko.com.channels.xml
|
|
||||||
```
|
|
||||||
|
|
||||||
### Test
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm test --- ipko.com
|
|
||||||
```
|
|
Loading…
Add table
Add a link
Reference in a new issue