mirror of https://github.com/Free-TV/IPTV
Merge and update Greek TV channels
commit
8d3294ac6b
|
|
@ -11,10 +11,10 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: "20.10.x"
|
node-version: "20.10.x"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,12 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v6
|
||||||
- name: Update playlist
|
- name: Update playlist
|
||||||
run: |
|
run: |
|
||||||
git config user.name "PlaylistBot" || true
|
git config user.name "PlaylistBot" || true
|
||||||
git config user.email "playlistbot@users.noreply.github.com" || true
|
git config user.email "playlistbot@users.noreply.github.com" || true
|
||||||
python3 ./make_playlist.py
|
python3 ./make_playlist.py
|
||||||
git add .
|
git add .
|
||||||
git commit --quiet -m "Update Playlist (GitHub Actions)"
|
git diff --staged --quiet || git commit --quiet -m "Update Playlist (GitHub Actions)"
|
||||||
git push -f origin master
|
git diff --quiet HEAD @{u} || git push -f origin HEAD
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@
|
||||||
| 29 | TV5 Monde Info | [>](https://ott.tv5monde.com/Content/HLS/Live/channel(info)/index.m3u8) | <img height="20" src="https://i.imgur.com/NcysrWH.png"/> | TV5MondeInfo.fr |
|
| 29 | TV5 Monde Info | [>](https://ott.tv5monde.com/Content/HLS/Live/channel(info)/index.m3u8) | <img height="20" src="https://i.imgur.com/NcysrWH.png"/> | TV5MondeInfo.fr |
|
||||||
| 30 | TV5 Monde FBS | [>](https://ott.tv5monde.com/Content/HLS/Live/channel(fbs)/index.m3u8) | <img height="20" src="https://i.imgur.com/uPmwTo9.png"/> | TV5MondeFranceBelgiumSwitzerland.fr |
|
| 30 | TV5 Monde FBS | [>](https://ott.tv5monde.com/Content/HLS/Live/channel(fbs)/index.m3u8) | <img height="20" src="https://i.imgur.com/uPmwTo9.png"/> | TV5MondeFranceBelgiumSwitzerland.fr |
|
||||||
| 31 | TV5 Monde Europe | [>](https://ott.tv5monde.com/Content/HLS/Live/channel(europe)/index.m3u8) | <img height="20" src="https://i.imgur.com/uPmwTo9.png"/> | TV5MondeEurope.fr |
|
| 31 | TV5 Monde Europe | [>](https://ott.tv5monde.com/Content/HLS/Live/channel(europe)/index.m3u8) | <img height="20" src="https://i.imgur.com/uPmwTo9.png"/> | TV5MondeEurope.fr |
|
||||||
| 0 | RT France Ⓖ | [>](https://rt-fra.rttv.com/dvr/rtfrance/playlist.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/RT-France-logo.svg/512px-RT-France-logo.svg.png"/> | RTFrance.fr |
|
|
||||||
|
|
||||||
<h2>Unreliable (other)</h2>
|
<h2>Unreliable (other)</h2>
|
||||||
|
|
||||||
|
|
@ -46,7 +45,7 @@
|
||||||
| 15 | BFM TV | [x](https://bfmtvalive1-a.akamaihd.net/r8ef15893bf3d4c2db0105218bdfe87f4/eu-central-1/876450610001/playlist.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Logo_BFM_TV_%282019%29.png/53px-Logo_BFM_TV_%282019%29.png"/> | BFMTV.fr |
|
| 15 | BFM TV | [x](https://bfmtvalive1-a.akamaihd.net/r8ef15893bf3d4c2db0105218bdfe87f4/eu-central-1/876450610001/playlist.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Logo_BFM_TV_%282019%29.png/53px-Logo_BFM_TV_%282019%29.png"/> | BFMTV.fr |
|
||||||
| 18 | Gulli | [x](https://d13anarbtxy8c5.cloudfront.net/6play/short/clr/gulli/sdindex.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/fr/thumb/4/43/18._Gulli.png/57px-18._Gulli.png"/> | Gulli.fr |
|
| 18 | Gulli | [x](https://d13anarbtxy8c5.cloudfront.net/6play/short/clr/gulli/sdindex.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/fr/thumb/4/43/18._Gulli.png/57px-18._Gulli.png"/> | Gulli.fr |
|
||||||
| 22 | 6ter | [x]() | <img height="20" src="https://upload.wikimedia.org/wikipedia/fr/thumb/a/a9/6ter_2012.png/73px-6ter_2012.png"/> | 6ter.fr |
|
| 22 | 6ter | [x]() | <img height="20" src="https://upload.wikimedia.org/wikipedia/fr/thumb/a/a9/6ter_2012.png/73px-6ter_2012.png"/> | 6ter.fr |
|
||||||
| 26 | LCI | [x](https://sv0.data-stream.top/hls/lci.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/fr/thumb/3/38/LCI_-_Logo_%28Ao%C3%BBt_2017%29.svg/62px-LCI_-_Logo_%28Ao%C3%BBt_2017%29.svg.png"/> | LCI.fr |
|
| 26 | LCI | [x](https://sv0.data-stream.top/hls/lci.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/fr/8/85/LCI.png/> | LCI.fr |
|
||||||
|
|
||||||
<h2>Unreliable (tntdirect)</h2>
|
<h2>Unreliable (tntdirect)</h2>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
<h2>Athens Attica Regional Channels</h2>
|
<h2>Athens Attica Regional Channels</h2>
|
||||||
|
|
||||||
| # | Channel | Link | Logo | EPG id |
|
| # | Channel | Link | Logo | EPG id |
|
||||||
|:--:|:----------------|:----------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------|:------------------|
|
|:--:|:----------------|:------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------|:------------------|
|
||||||
| 31 | Action24 | [>](https://actionlive.siliconweb.com/actionabr/actiontv/playlist.m3u8) | <img height="20" src="https://i.imgur.com/Zi1YohT.png"/> | Action24TV.gr |
|
| 31 | Action24 | [>](https://actionlive.siliconweb.com/actionabr/actiontv/playlist.m3u8) | <img height="20" src="https://i.imgur.com/Zi1YohT.png"/> | Action24TV.gr |
|
||||||
| 32 | Alert | [>](https://itv.streams.ovh/ALEERT/ALEERT/playlist.m3u8) | <img height="20" src="https://i.imgur.com/xqa87lG.png"/> | alert.gr |
|
| 32 | Alert | [>](https://itv.streams.ovh/ALEERT/ALEERT/playlist.m3u8) | <img height="20" src="https://i.imgur.com/xqa87lG.png"/> | alert.gr |
|
||||||
| 33 | ART | [>](https://rumble.com/live-hls-dvr/73h8c2/playlist.m3u8) | <img height="20" src="https://i.imgur.com/7TyUxLj.png"/> | arttv.gr |
|
| 33 | ART | [>](https://rumble.com/live-hls-dvr/73h8c2/playlist.m3u8) | <img height="20" src="https://i.imgur.com/7TyUxLj.png"/> | arttv.gr |
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
| 35 | High TV | [>](https://live.streams.ovh/hightv/hightv/playlist.m3u8) | <img height="20" src="https://i.imgur.com/wHzCGry.png"/> | hightv.gr |
|
| 35 | High TV | [>](https://live.streams.ovh/hightv/hightv/playlist.m3u8) | <img height="20" src="https://i.imgur.com/wHzCGry.png"/> | hightv.gr |
|
||||||
| 36 | Kontra | [>](https://kontralive.siliconweb.com/live/kontratv/playlist.m3u8) | <img height="20" src="https://i.imgur.com/ROZ9VfV.png"/> | KontraChannel.gr |
|
| 36 | Kontra | [>](https://kontralive.siliconweb.com/live/kontratv/playlist.m3u8) | <img height="20" src="https://i.imgur.com/ROZ9VfV.png"/> | KontraChannel.gr |
|
||||||
| 37 | Mad | [x]() | <img height="20" src="https://i.imgur.com/OTTxxGe.png"/> | Mad.gr |
|
| 37 | Mad | [x]() | <img height="20" src="https://i.imgur.com/OTTxxGe.png"/> | Mad.gr |
|
||||||
| 38 | Naftemporiki TV | [>](https://stream-188125.castr.net/631af9c016e5eace19ff9a5b/live_048998706a2311ee83b33fe7fbad252d/index.fmp4.m3u8) | <img height="20" src="https://i.imgur.com/9OFdMud.png"/> | NaftemporikiTV.gr |
|
| 38 | Naftemporiki TV | [>](https://telmaco.ascdn.broadpeak.io/nafteboriki/default/index.m3u8) | <img height="20" src="https://i.imgur.com/9OFdMud.png"/> | NaftemporikiTV.gr |
|
||||||
| 39 | One Channel | [>](https://onechannel.siliconweb.com/one/stream/chunks_dvr.m3u8) | <img height="20" src="https://i.imgur.com/GwKaHbM.png"/> | OneChannel.gr |
|
| 39 | One Channel | [>](https://onechannel.siliconweb.com/one/stream/chunks_dvr.m3u8) | <img height="20" src="https://i.imgur.com/GwKaHbM.png"/> | OneChannel.gr |
|
||||||
| 40 | Rise | [x](http://ovh-edge-h.evrideo.com:8080/23e234f2-aec8-4804-b694-4cdd71d2d48d_MONITORING_HLS/video_240p_WEBRTC_MONITORING.m3u8) | <img height="20" src="https://i.imgur.com/B6ZtqJ8.png"/> | risetv.gr |
|
| 40 | Rise | [x](http://ovh-edge-h.evrideo.com:8080/23e234f2-aec8-4804-b694-4cdd71d2d48d_MONITORING_HLS/video_240p_WEBRTC_MONITORING.m3u8) | <img height="20" src="https://i.imgur.com/B6ZtqJ8.png"/> | risetv.gr |
|
||||||
| 41 | Smile | [x](https://s1.cystream.net/live/smile/playlist.m3u8) | <img height="20" src="https://i.imgur.com/Ax6K20a.png"/> | tvsmile.gr |
|
| 41 | Smile | [x](https://s1.cystream.net/live/smile/playlist.m3u8) | <img height="20" src="https://i.imgur.com/Ax6K20a.png"/> | tvsmile.gr |
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,10 @@ https://en.wikipedia.org/wiki/List_of_4K_channels_in_India
|
||||||
| 8 | DD Kisan Ⓨ | [>](https://www.youtube.com/@DDKisan/live) | <img height="20" src="https://i.imgur.com/x56WJEa.png" /> | DDKisan.in |
|
| 8 | DD Kisan Ⓨ | [>](https://www.youtube.com/@DDKisan/live) | <img height="20" src="https://i.imgur.com/x56WJEa.png" /> | DDKisan.in |
|
||||||
| 9 | DD Urdu Ⓨ | [>](https://www.youtube.com/@DDUrdu/live) | <img height="20" src="https://i.imgur.com/OiQPS34.png" /> | DDUrdu.in |
|
| 9 | DD Urdu Ⓨ | [>](https://www.youtube.com/@DDUrdu/live) | <img height="20" src="https://i.imgur.com/OiQPS34.png" /> | DDUrdu.in |
|
||||||
| 10 | India Today Ⓨ | [>](https://www.youtube.com/watch?v=sYZtOFzM78M) | <img height="20" src="https://i.imgur.com/C7KK3Fd.png" /> | IndiaToday.in |
|
| 10 | India Today Ⓨ | [>](https://www.youtube.com/watch?v=sYZtOFzM78M) | <img height="20" src="https://i.imgur.com/C7KK3Fd.png" /> | IndiaToday.in |
|
||||||
|
| 11 | Aaj Tak Ⓨ | [>](https://www.youtube.com/watch?v=Nq2wYlWFucg) | <img height="20" src="https://upload.wikimedia.org/wikipedia/commons/2/28/Aaj_tak_logo.png" /> | AajTak.in |
|
||||||
|
| 12 | India TV Ⓨ | [>](https://www.youtube.com/watch?v=e1FIApIafWE) | <img height="20" src="https://upload.wikimedia.org/wikipedia/en/thumb/6/60/India_tv_logo-en.png/500px-India_tv_logo-en.png" /> | IndiaTV.in |
|
||||||
|
| 13 | TV9 Bharatvarsh Ⓨ | [>](https://www.youtube.com/watch?v=nSpwwcHVp80) | <img height="20" src="https://upload.wikimedia.org/wikipedia/en/thumb/a/a6/TV9_Bharatvarsh.svg/500px-TV9_Bharatvarsh.svg.png" /> | TV9Bharatvarsh.in |
|
||||||
|
| 14 | Republic Bharat Ⓨ | [>](https://www.youtube.com/watch?v=3DbTO_AMhhc) | <img height="20" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Republic_Bharat_logo.svg/500px-Republic_Bharat_logo.svg.png" /> | RepublicBharat.in |
|
||||||
|
|
||||||
|
|
||||||
<h2>Invalid</h2>
|
<h2>Invalid</h2>
|
||||||
|
|
|
||||||
|
|
@ -74,9 +74,9 @@ https://ru.wikipedia.org/wiki/Цифровое_телевидение_в_Рос
|
||||||
| 0 | Небеса ТВ7 Ⓢ | [>](https://vod.tv7.fi/tv7-ru/tv7-ru.smil/playlist.m3u8) | <img height="20" src="https://www.nebesatv7.com/wp-content/themes/tv7-theme/assets/img/logo_nebesa_short.png"/> | NebesaTV7.ru |
|
| 0 | Небеса ТВ7 Ⓢ | [>](https://vod.tv7.fi/tv7-ru/tv7-ru.smil/playlist.m3u8) | <img height="20" src="https://www.nebesatv7.com/wp-content/themes/tv7-theme/assets/img/logo_nebesa_short.png"/> | NebesaTV7.ru |
|
||||||
| 0 | Север | [>](https://live.mediacdn.ru/sr1/sever/playlist.m3u8) | <img height="20" src="https://i.imgur.com/sTOQLYl.png"/> | Sever.ru |
|
| 0 | Север | [>](https://live.mediacdn.ru/sr1/sever/playlist.m3u8) | <img height="20" src="https://i.imgur.com/sTOQLYl.png"/> | Sever.ru |
|
||||||
| 0 | Смотрим - Детям | [x]() | <img height="20" src="https://cdn-st1.smotrim.ru/vh/pictures/r/424/215/2.png"/> |
|
| 0 | Смотрим - Детям | [x]() | <img height="20" src="https://cdn-st1.smotrim.ru/vh/pictures/r/424/215/2.png"/> |
|
||||||
| 0 | Смотрим - Мелодрамы | [>](https://live-vgtrksmotrim.cdnvideo.ru/vgtrksmotrim/smotrim-live-02.smil/playlist.m3u8) | <img height="20" src="https://cdn-st1.smotrim.ru/vh/pictures/r/456/967/6.png"/> |
|
| 0 | Смотрим: Мелодрамы | [>](https://live-vgtrksmotrim.cdnvideo.ru/vgtrksmotrim/smotrim-live-02.smil/playlist.m3u8) | <img height="20" src="https://cdn-st1.smotrim.ru/vh/pictures/r/456/967/6.png"/> |
|
||||||
| 0 | Смотрим - Тайны | [>](https://live-vgtrksmotrim.cdnvideo.ru/vgtrksmotrim/smotrim-live-07.smil/playlist.m3u8) | <img height="20" src="https://cdn-st3.smotrim.ru/vh/pictures/r/456/396/2.png"/> |
|
| 0 | Смотрим: Тайны | [>](https://live-vgtrksmotrim.cdnvideo.ru/vgtrksmotrim/smotrim-live-07.smil/playlist.m3u8) | <img height="20" src="https://cdn-st3.smotrim.ru/vh/pictures/r/456/396/2.png"/> |
|
||||||
| 0 | Смотрим - Честный Детектив | [>](https://live-vgtrksmotrim.cdnvideo.ru/vgtrksmotrim/smotrim-live-01.smil/playlist.m3u8) | <img height="20" src="https://cdn-st3.smotrim.ru/vh/pictures/r/444/241/8.png"/> |
|
| 0 | Смотрим: Честный Детектив | [>](https://live-vgtrksmotrim.cdnvideo.ru/vgtrksmotrim/smotrim-live-01.smil/playlist.m3u8) | <img height="20" src="https://cdn-st3.smotrim.ru/vh/pictures/r/444/241/8.png"/> |
|
||||||
| 0 | Соловьёв Live | [>](https://player.smotrim.ru/iframe/stream/live_id/63338) | <img height="20" src="https://i.imgur.com/v0OYe1d.png"/> | SolovyovLive.ru |
|
| 0 | Соловьёв Live | [>](https://player.smotrim.ru/iframe/stream/live_id/63338) | <img height="20" src="https://i.imgur.com/v0OYe1d.png"/> | SolovyovLive.ru |
|
||||||
| 0 | Ю Ⓢ | [>](https://strm.yandex.ru/kal/utv/utv0.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/ru/a/ac/%D0%9B%D0%BE%D0%B3%D0%BE%D1%82%D0%B8%D0%BF_%D1%82%D0%B5%D0%BB%D0%B5%D0%BA%D0%B0%D0%BD%D0%B0%D0%BB%D0%B0_%C2%AB%D0%AE%C2%BB_%28%D1%81_3_%D1%81%D0%B5%D0%BD%D1%82%D1%8F%D0%B1%D1%80%D1%8F_2018_%D0%B3%D0%BE%D0%B4%D0%B0%29.png"/> | U.ru |
|
| 0 | Ю Ⓢ | [>](https://strm.yandex.ru/kal/utv/utv0.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/ru/a/ac/%D0%9B%D0%BE%D0%B3%D0%BE%D1%82%D0%B8%D0%BF_%D1%82%D0%B5%D0%BB%D0%B5%D0%BA%D0%B0%D0%BD%D0%B0%D0%BB%D0%B0_%C2%AB%D0%AE%C2%BB_%28%D1%81_3_%D1%81%D0%B5%D0%BD%D1%82%D1%8F%D0%B1%D1%80%D1%8F_2018_%D0%B3%D0%BE%D0%B4%D0%B0%29.png"/> | U.ru |
|
||||||
|
|
||||||
|
|
|
||||||
141
make_playlist.py
141
make_playlist.py
|
|
@ -3,11 +3,98 @@
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
EPG_LIST = open('epglist.txt',"r") # for a clean code
|
COUNTRY_CODES = {
|
||||||
|
"albania": "AL",
|
||||||
|
"andorra": "AD",
|
||||||
|
"argentina": "AR",
|
||||||
|
"armenia": "AM",
|
||||||
|
"australia": "AU",
|
||||||
|
"austria": "AT",
|
||||||
|
"azerbaijan": "AZ",
|
||||||
|
"belarus": "BY",
|
||||||
|
"belgium": "BE",
|
||||||
|
"bosnia_and_herzegovina": "BA",
|
||||||
|
"brazil": "BR",
|
||||||
|
"bulgaria": "BG",
|
||||||
|
"canada": "CA",
|
||||||
|
"chad": "TD",
|
||||||
|
"chile": "CL",
|
||||||
|
"china": "CN",
|
||||||
|
"costa_rica": "CR",
|
||||||
|
"croatia": "HR",
|
||||||
|
"cyprus": "CY",
|
||||||
|
"czech_republic": "CZ",
|
||||||
|
"denmark": "DK",
|
||||||
|
"dominican_republic": "DO",
|
||||||
|
"egypt": "EG",
|
||||||
|
"estonia": "EE",
|
||||||
|
"faroe_islands": "FO",
|
||||||
|
"finland": "FI",
|
||||||
|
"france": "FR",
|
||||||
|
"georgia": "GE",
|
||||||
|
"germany": "DE",
|
||||||
|
"greece": "GR",
|
||||||
|
"greenland": "GL",
|
||||||
|
"hong_kong": "HK",
|
||||||
|
"hongkong": "HK",
|
||||||
|
"hungary": "HU",
|
||||||
|
"iceland": "IS",
|
||||||
|
"india": "IN",
|
||||||
|
"indonesia": "ID",
|
||||||
|
"iran": "IR",
|
||||||
|
"iraq": "IQ",
|
||||||
|
"ireland": "IE",
|
||||||
|
"israel": "IL",
|
||||||
|
"italy": "IT",
|
||||||
|
"japan": "JP",
|
||||||
|
"korea": "KR",
|
||||||
|
"kosovo": "XK",
|
||||||
|
"latvia": "LV",
|
||||||
|
"lithuania": "LT",
|
||||||
|
"luxembourg": "LU",
|
||||||
|
"macau": "MO",
|
||||||
|
"malta": "MT",
|
||||||
|
"mexico": "MX",
|
||||||
|
"moldova": "MD",
|
||||||
|
"monaco": "MC",
|
||||||
|
"montenegro": "ME",
|
||||||
|
"netherlands": "NL",
|
||||||
|
"north_korea": "KP",
|
||||||
|
"north_macedonia": "MK",
|
||||||
|
"norway": "NO",
|
||||||
|
"paraguay": "PY",
|
||||||
|
"peru": "PE",
|
||||||
|
"poland": "PL",
|
||||||
|
"portugal": "PT",
|
||||||
|
"qatar": "QA",
|
||||||
|
"romania": "RO",
|
||||||
|
"russia": "RU",
|
||||||
|
"san_marino": "SM",
|
||||||
|
"saudi_arabia": "SA",
|
||||||
|
"serbia": "RS",
|
||||||
|
"slovakia": "SK",
|
||||||
|
"slovenia": "SI",
|
||||||
|
"somalia": "SO",
|
||||||
|
"spain": "ES",
|
||||||
|
"spain_vod": "ES",
|
||||||
|
"sweden": "SE",
|
||||||
|
"switzerland": "CH",
|
||||||
|
"taiwan": "TW",
|
||||||
|
"trinidad": "TT",
|
||||||
|
"turkey": "TR",
|
||||||
|
"uk": "GB",
|
||||||
|
"ukraine": "UA",
|
||||||
|
"united_arab_emirates": "AE",
|
||||||
|
"usa": "US",
|
||||||
|
"usa_vod": "US",
|
||||||
|
"venezuela": "VE",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class Channel:
|
class Channel:
|
||||||
def __init__(self, group, md_line):
|
def __init__(self, group, md_line, country_code=""):
|
||||||
self.group = group
|
self.group = group
|
||||||
|
self.country_code = country_code
|
||||||
md_line = md_line.strip()
|
md_line = md_line.strip()
|
||||||
parts = md_line.split("|")
|
parts = md_line.split("|")
|
||||||
self.number = parts[1].strip()
|
self.number = parts[1].strip()
|
||||||
|
|
@ -22,39 +109,49 @@ class Channel:
|
||||||
self.epg = None
|
self.epg = None
|
||||||
|
|
||||||
def to_m3u_line(self):
|
def to_m3u_line(self):
|
||||||
|
country = f' tvg-country="{self.country_code}"' if self.country_code else ""
|
||||||
if self.epg is None:
|
if self.epg is None:
|
||||||
return (f'#EXTINF:-1 tvg-name="{self.name}" tvg-logo="{self.logo}" group-title="{self.group}",{self.name}\n{self.url}')
|
return (f'#EXTINF:-1 tvg-name="{self.name}" tvg-logo="{self.logo}"{country} group-title="{self.group}",{self.name}\n{self.url}')
|
||||||
else:
|
else:
|
||||||
return (f'#EXTINF:-1 tvg-name="{self.name}" tvg-logo="{self.logo}" tvg-id="{self.epg}" group-title="{self.group}",{self.name}\n{self.url}')
|
return (f'#EXTINF:-1 tvg-name="{self.name}" tvg-logo="{self.logo}" tvg-id="{self.epg}"{country} group-title="{self.group}",{self.name}\n{self.url}')
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
dir_playlists = 'playlists'
|
base_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
if not (os.path.isdir(dir_playlists)):
|
lists_dir = os.path.join(base_dir, "lists")
|
||||||
|
dir_playlists = os.path.join(base_dir, "playlists")
|
||||||
|
|
||||||
|
if not os.path.isdir(dir_playlists):
|
||||||
os.mkdir(dir_playlists)
|
os.mkdir(dir_playlists)
|
||||||
with open("playlist.m3u8", "w", encoding='utf-8') as playlist:
|
|
||||||
processed_epg_list = ", ".join(EPG_LIST).replace('\n', '')
|
with open(os.path.join(base_dir, "epglist.txt"), encoding='utf-8') as epg_file:
|
||||||
head_playlist = f'#EXTM3U x-tvg-url="{processed_epg_list}"'
|
epg_urls = [line.strip() for line in epg_file if line.strip()]
|
||||||
print(f'#EXTM3U x-tvg-url="{processed_epg_list}"', file=playlist)
|
processed_epg_list = ", ".join(epg_urls)
|
||||||
os.chdir("lists")
|
head_playlist = f'#EXTM3U x-tvg-url="{processed_epg_list}"\n'
|
||||||
for filename in sorted(os.listdir(".")):
|
|
||||||
|
with open(os.path.join(base_dir, "playlist.m3u8"), "w", encoding='utf-8') as playlist:
|
||||||
|
playlist.write(head_playlist)
|
||||||
|
for filename in sorted(os.listdir(lists_dir)):
|
||||||
if filename == "README.md" or not filename.endswith(".md"):
|
if filename == "README.md" or not filename.endswith(".md"):
|
||||||
continue
|
continue
|
||||||
with open(filename, encoding='utf-8') as markup_file:
|
markup_path = os.path.join(lists_dir, filename)
|
||||||
file_country = os.path.join("..", dir_playlists, "playlist_" + filename[:-3:] + ".m3u8")
|
country_path = os.path.join(dir_playlists, "playlist_" + filename[:-3] + ".m3u8")
|
||||||
playlist_country = open(file_country, "w", encoding='utf-8')
|
country_key = filename[:-3]
|
||||||
playlist_country.write(head_playlist + "\n")
|
group = country_key.replace("_", " ").title()
|
||||||
group = filename.replace(".md", "").title()
|
country_code = COUNTRY_CODES.get(country_key, "")
|
||||||
print(f"Generating {group}")
|
print(f"Generating {group}")
|
||||||
|
with open(markup_path, encoding='utf-8') as markup_file, \
|
||||||
|
open(country_path, "w", encoding='utf-8') as playlist_country:
|
||||||
|
playlist_country.write(head_playlist)
|
||||||
for line in markup_file:
|
for line in markup_file:
|
||||||
if "<h1>" in line.lower() and "</h1>" in line.lower():
|
if "<h1>" in line.lower() and "</h1>" in line.lower():
|
||||||
group = re.sub('<[^<>]+>', '', line.strip())
|
group = re.sub('<[^<>]+>', '', line.strip())
|
||||||
if not "[>]" in line:
|
if "[>]" not in line:
|
||||||
continue
|
continue
|
||||||
channel = Channel(group, line)
|
channel = Channel(group, line, country_code)
|
||||||
print(channel.to_m3u_line(), file=playlist)
|
m3u_line = channel.to_m3u_line()
|
||||||
print(channel.to_m3u_line(), file=playlist_country)
|
print(m3u_line, file=playlist)
|
||||||
playlist_country.close()
|
print(m3u_line, file=playlist_country)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
|
||||||
3300
playlist.m3u8
3300
playlist.m3u8
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue