diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml
index 67e77856..f5d87f85 100644
--- a/.github/workflows/auto-update.yml
+++ b/.github/workflows/auto-update.yml
@@ -4,6 +4,21 @@ on:
schedule:
- cron: '0 0 * * *'
jobs:
+ tvgid_ua:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2.3.1
+ - name: Install Dependencies
+ run: npm install
+ - name: Run EPG Grabber
+ run: npx epg-grabber --config=sites/tvgid.ua.config.js
+ - name: Deploy to GitHub Pages
+ uses: JamesIves/github-pages-deploy-action@4.1.0
+ with:
+ branch: gh-pages
+ folder: .gh-pages
+ clean: false
m_tv_sms_cz:
runs-on: ubuntu-latest
steps:
diff --git a/README.md b/README.md
index 16348715..3f87edc1 100644
--- a/README.md
+++ b/README.md
@@ -22,6 +22,7 @@ To load a program guide, all you need to do is copy the link to one of the guide
Russian | tv.yandex.ru | 469 | https://iptv-org.github.io/epg/guides/tv.yandex.ru.guide.xml |
Spanish | programacion-tv.elpais.com | 158 | https://iptv-org.github.io/epg/guides/programacion-tv.elpais.com.guide.xml |
Turkish | digiturk.com.tr | 106 | https://iptv-org.github.io/epg/guides/digiturk.com.tr.guide.xml |
+ Ukrainian | tvgid.ua | 152 | https://iptv-org.github.io/epg/guides/tvgid.ua.guide.xml |
diff --git a/package-lock.json b/package-lock.json
index 6c4edd82..d83a9491 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -7,9 +7,10 @@
"license": "MIT",
"dependencies": {
"dayjs": "^1.10.4",
- "epg-grabber": "^0.2.6",
+ "epg-grabber": "^0.3.0",
"glob": "^7.1.6",
"html-to-text": "^7.0.0",
+ "iconv-lite": "^0.4.24",
"jsdom": "^16.5.0",
"parse-duration": "^0.4.4",
"xml-js": "^1.6.11"
@@ -364,9 +365,9 @@
}
},
"node_modules/epg-grabber": {
- "version": "0.2.6",
- "resolved": "https://registry.npmjs.org/epg-grabber/-/epg-grabber-0.2.6.tgz",
- "integrity": "sha512-SEeAI7JoZt8NSozlEHP/E/LA82Qo85l53Ifw5yOunqcw9S211oapmCTE5t2rj67Bw7I5+61xJx1M8+OMqvIIHQ==",
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/epg-grabber/-/epg-grabber-0.3.0.tgz",
+ "integrity": "sha512-wemhE2TqCHkxSy+bhaeHDzZ6OL1KR3YnDb2qmci8uq98PX36sYx6wNIcrskTFYYy/URKXwLZj/9Z1QLqKKAP5Q==",
"dependencies": {
"axios": "^0.21.1",
"axios-cookiejar-support": "^1.0.1",
@@ -1548,9 +1549,9 @@
"integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w=="
},
"epg-grabber": {
- "version": "0.2.6",
- "resolved": "https://registry.npmjs.org/epg-grabber/-/epg-grabber-0.2.6.tgz",
- "integrity": "sha512-SEeAI7JoZt8NSozlEHP/E/LA82Qo85l53Ifw5yOunqcw9S211oapmCTE5t2rj67Bw7I5+61xJx1M8+OMqvIIHQ==",
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/epg-grabber/-/epg-grabber-0.3.0.tgz",
+ "integrity": "sha512-wemhE2TqCHkxSy+bhaeHDzZ6OL1KR3YnDb2qmci8uq98PX36sYx6wNIcrskTFYYy/URKXwLZj/9Z1QLqKKAP5Q==",
"requires": {
"axios": "^0.21.1",
"axios-cookiejar-support": "^1.0.1",
diff --git a/package.json b/package.json
index 5c6a260c..83badfbd 100644
--- a/package.json
+++ b/package.json
@@ -8,9 +8,10 @@
"license": "MIT",
"dependencies": {
"dayjs": "^1.10.4",
- "epg-grabber": "^0.2.6",
+ "epg-grabber": "^0.3.0",
"glob": "^7.1.6",
"html-to-text": "^7.0.0",
+ "iconv-lite": "^0.4.24",
"jsdom": "^16.5.0",
"parse-duration": "^0.4.4",
"xml-js": "^1.6.11"
diff --git a/sites/tvgid.ua.channels.xml b/sites/tvgid.ua.channels.xml
new file mode 100755
index 00000000..c678c03b
--- /dev/null
+++ b/sites/tvgid.ua.channels.xml
@@ -0,0 +1,157 @@
+
+
+
+ 11 канал
+ 1+1
+ 2+2
+ 34 телеканал
+ UA: Дніпро
+ 5 канал
+ 8 канал
+ 9 канал
+ Ajara TV
+ Академія
+ ТРК Алекс
+ AMC Ukraine
+ Animal Planet Europe
+ BBC World News Europe
+ Беларусь 24
+ Бігуді
+ Bolt
+ Буг-ТВ
+ Cartoon Network Russia & Southeastern European
+ CBS Reality Europe
+ Че
+ ЧП.інфо
+ Детский мир
+ Discovery Channel Europe
+ Discovery Channel Ukraine
+ Disney Channel Ukraine
+ Домашний
+ Донбасс
+ DTX Ukraine
+ Enter-фільм
+ Еспресо TV
+ EU Music
+ Euronews по-русски
+ Eurosport 1 Россия
+ Eurosport 2 Россия
+ Еврокино
+ Extreme Sports Channel
+ Fox Russia
+ Fox Life Russia
+ Футбол 1
+ Футбол 2
+ ОТБ Галичина
+ Глас
+ UA: Культура
+ ICTV
+ Investigation Discovery Europe
+ Індиго TV
+ Інтер
+ Інтер+
+ ИТВ
+ Живи!
+ К1
+ К2
+ Київ TV
+ Киномикс
+ Кинопремьера HD
+ Кинохит
+ Культура
+ Квартал TV
+ М1
+ Малятко TV
+ Маріупольське ТБ
+ Матч! Арена
+ Матч! Боец
+ Матч! Игра
+ Матч ТВ
+ Мега
+ Мир ТВ
+ МТМ
+ Мультиландия
+ Music Box UA
+ Муз-ТВ
+ Мужское кино
+ Надія
+ НАШ
+ РТВ - Любимое кино
+ Наше Новое Кино
+ Nat Geo Wild Russia
+ National Geographic Russia
+ НТС
+ Nickelodeon Россия
+ НЛО TV
+ Nobel TV
+ Новий канал
+ НТН
+ Obozrevatel TV
+ Охотник и рыболов
+ ОНТ
+ ОЦЕ ТБ
+ O-TV
+ Paramount Comedy Україна
+ Перший Автомобільний
+ Первый крымский
+ Перший Діловий
+ Піксель TV
+ ПлюсПлюс
+ TVP Polonia
+ Polsat
+ Prime Time
+ Прямий
+ Пятница!
+ Рівне 1
+ Рыжий
+ RTVi Europe
+ Setanta Sports Ukraine
+ Сігма
+ Simon
+ Сонце
+ Sony Sci-Fi Russia
+ Спас
+ Спорт 1
+ Спорт 2
+ Star Cinema
+ Star Family
+ СТБ
+ СТС
+ 24 Канал
+ ТЕТ
+ Travel Channel Europe
+ TV1000 CEE
+ TV1000 East
+ TV1000 World Kino
+ ТВ-3
+ TV1000 Action CEE
+ TV1000 Action East
+ TV-4
+ TV5 (Запорожье)
+ TV XXI
+ TVP1
+ TVP2
+ Ю
+ UA: Черкаси
+ UA: Перший
+ UA: Полтава
+ UA: Тернопіль
+ UA: Закарпаття
+ Україна
+ УНІАН ТБ
+ Viasat Explore East
+ Viasat History
+ Viasat Nature East
+ Viasat Sport East
+ Відкритий
+ ViP Comedy Russia
+ ViP Comedy CEE
+ ViP Premiere CEE
+ Віта ТБ
+ XSPORT
+ UA: Запоріжжя
+ Зоо ТВ
+ Zoom
+ Zоопарк
+
+
\ No newline at end of file
diff --git a/sites/tvgid.ua.config.js b/sites/tvgid.ua.config.js
new file mode 100644
index 00000000..2b086c49
--- /dev/null
+++ b/sites/tvgid.ua.config.js
@@ -0,0 +1,54 @@
+const urlParser = require('url')
+const jsdom = require('jsdom')
+const iconv = require('iconv-lite')
+const { JSDOM } = jsdom
+const dayjs = require('dayjs')
+const utc = require('dayjs/plugin/utc')
+const customParseFormat = require('dayjs/plugin/customParseFormat')
+
+dayjs.extend(utc)
+dayjs.extend(customParseFormat)
+
+module.exports = {
+ lang: 'uk',
+ site: 'tvgid.ua',
+ channels: 'tvgid.ua.channels.xml',
+ output: '.gh-pages/guides/tvgid.ua.guide.xml',
+ url: function ({ date, channel }) {
+ return `https://tvgid.ua/channels/${channel.site_id}/${date.format('DDMMYYYY')}/tmall/`
+ },
+ parser: function ({ buffer, date }) {
+ const programs = []
+ const string = iconv.decode(buffer, 'win1251')
+ const dom = new JSDOM(string)
+ const items = dom.window.document.querySelectorAll(
+ '#container > tbody > tr:nth-child(2) > td > table > tbody > tr > td > table:nth-child(2) > tbody > tr'
+ )
+
+ items.forEach(item => {
+ const time = (item.querySelector('td > table > tbody > tr > td.time') || { textContent: '' })
+ .textContent
+ const title = (
+ item.querySelector('td > table > tbody > tr > td.item > a') ||
+ item.querySelector('td > table > tbody > tr > td.item') || { textContent: '' }
+ ).textContent
+
+ const start = dayjs
+ .utc(time, 'HH:mm')
+ .set('D', date.get('D'))
+ .set('M', date.get('M'))
+ .set('y', date.get('y'))
+
+ if (programs.length && !programs[programs.length - 1].stop) {
+ programs[programs.length - 1].stop = start
+ }
+
+ programs.push({
+ title,
+ start
+ })
+ })
+
+ return programs
+ }
+}