From cb19162047bffee8ea76f76e6faa91b2c53f4cb5 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:16:06 +0300 Subject: [PATCH] Update tvim.tv --- sites/tvim.tv/readme.md | 21 ++++++++++ sites/tvim.tv/tvim.tv.channels.xml | 61 ++++++++++++++---------------- sites/tvim.tv/tvim.tv.config.js | 18 +++++++++ sites/tvim.tv/tvim.tv.test.js | 2 - 4 files changed, 67 insertions(+), 35 deletions(-) create mode 100644 sites/tvim.tv/readme.md diff --git a/sites/tvim.tv/readme.md b/sites/tvim.tv/readme.md new file mode 100644 index 00000000..bfb90c0a --- /dev/null +++ b/sites/tvim.tv/readme.md @@ -0,0 +1,21 @@ +# tvim.tv + +https://www.tvim.tv/tv-guide/on-tvim + +### Download the guide + +```sh +npm run grab -- --site=tvim.tv +``` + +### Update channel list + +```sh +npm run channels:parse -- --config=./sites/tvim.tv/tvim.tv.config.js --output=./sites/tvim.tv/tvim.tv.channels.xml +``` + +### Test + +```sh +npm test -- tvim.tv +``` diff --git a/sites/tvim.tv/tvim.tv.channels.xml b/sites/tvim.tv/tvim.tv.channels.xml index 09c73d39..03a9e109 100644 --- a/sites/tvim.tv/tvim.tv.channels.xml +++ b/sites/tvim.tv/tvim.tv.channels.xml @@ -1,33 +1,28 @@ - - - Arena Sport 1 - Arena Sport 2 - Arena Sport 3 - Arena Sport 4 - Arena Sport 5 - ART Doku 1 - ART Doku 2 - Episode - Eurosport 1 - FOX Life - ART Kino 1 - ART Kino 2 - Klan Kosova - Kohavision - K Sport 1 - K Sport 2 - K Sport 3 - K Sport 4 - K Sport 5 - NBA TV - Prime TV - RTV 21 - ART Sport 1 - ART Sport 2 - ART Sport 3 - ART Sport 4 - ART Sport 5 - ART Sport 6 - T7 - Arta News - + + + Alsat M + ATV + IPKO Promo + Kanal 10 + Kids + Sofia + Doku 1 + Doku 2 + Kino 1 + Kino 2 + Klan Kosova + KTV + K-Sport 1 + K-Sport 2 + K-Sport 3 + K-Sport 4 + NBA TV + RTV 21 + TV Dukagjini + Sport 1 + Sport 2 + Sport 3 + Sport 4 + T7 + TeVe 1 + diff --git a/sites/tvim.tv/tvim.tv.config.js b/sites/tvim.tv/tvim.tv.config.js index 37fd3b04..678291af 100644 --- a/sites/tvim.tv/tvim.tv.config.js +++ b/sites/tvim.tv/tvim.tv.config.js @@ -25,6 +25,24 @@ module.exports = { }) return programs + }, + async channels() { + const axios = require('axios') + const data = await axios + .get(`https://www.tvim.tv/script/epg/category_channels?category=all&filter=playable`) + .then(r => r.data) + .catch(console.log) + + let channels = [] + data.data.forEach(item => { + channels.push({ + lang: 'sq', + site_id: item.epg_id, + name: item.name + }) + }) + + return channels } } diff --git a/sites/tvim.tv/tvim.tv.test.js b/sites/tvim.tv/tvim.tv.test.js index 6d98e9d9..9232cf38 100644 --- a/sites/tvim.tv/tvim.tv.test.js +++ b/sites/tvim.tv/tvim.tv.test.js @@ -1,5 +1,3 @@ -// npm run grab -- --site=tvim.tv - const { parser, url } = require('./tvim.tv.config.js') const dayjs = require('dayjs') const utc = require('dayjs/plugin/utc')