mirror of https://github.com/Free-TV/IPTV
Compare commits
11 Commits
8c034dd4d8
...
30f7062687
| Author | SHA1 | Date |
|---|---|---|
|
|
30f7062687 | |
|
|
bce5e4ff6b | |
|
|
e619e82306 | |
|
|
946dc0fc85 | |
|
|
dd3138c41a | |
|
|
8e1efe4f27 | |
|
|
148bc990ba | |
|
|
1b0fff3d4d | |
|
|
43b8dced11 | |
|
|
8a67a85d1a | |
|
|
f362385fcc |
|
|
@ -17,5 +17,5 @@ jobs:
|
|||
git config user.email "playlistbot@users.noreply.github.com" || true
|
||||
python3 ./make_playlist.py
|
||||
git add .
|
||||
git commit --quiet -m "Update Playlist (GitHub Actions)"
|
||||
git push -f origin master
|
||||
git diff --staged --quiet || git commit --quiet -m "Update Playlist (GitHub Actions)"
|
||||
git diff --quiet HEAD @{u} || git push -f origin HEAD
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <https://unlicense.org>
|
||||
|
|
@ -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 |
|
||||
| 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 |
|
||||
| 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>
|
||||
|
||||
|
|
@ -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 |
|
||||
| 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 |
|
||||
| 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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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 |
|
||||
| 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 |
|
||||
| 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>
|
||||
|
|
|
|||
|
|
@ -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 | Север | [>](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 | Смотрим - Мелодрамы | [>](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-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-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-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 | Ю Ⓢ | [>](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 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:
|
||||
def __init__(self, group, md_line):
|
||||
def __init__(self, group, md_line, country_code=""):
|
||||
self.group = group
|
||||
self.country_code = country_code
|
||||
md_line = md_line.strip()
|
||||
parts = md_line.split("|")
|
||||
self.number = parts[1].strip()
|
||||
|
|
@ -22,39 +109,49 @@ class Channel:
|
|||
self.epg = None
|
||||
|
||||
def to_m3u_line(self):
|
||||
country = f' tvg-country="{self.country_code}"' if self.country_code else ""
|
||||
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:
|
||||
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():
|
||||
dir_playlists = 'playlists'
|
||||
if not (os.path.isdir(dir_playlists)):
|
||||
base_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
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)
|
||||
with open("playlist.m3u8", "w", encoding='utf-8') as playlist:
|
||||
processed_epg_list = ", ".join(EPG_LIST).replace('\n', '')
|
||||
head_playlist = f'#EXTM3U x-tvg-url="{processed_epg_list}"'
|
||||
print(f'#EXTM3U x-tvg-url="{processed_epg_list}"', file=playlist)
|
||||
os.chdir("lists")
|
||||
for filename in sorted(os.listdir(".")):
|
||||
|
||||
with open(os.path.join(base_dir, "epglist.txt"), encoding='utf-8') as epg_file:
|
||||
epg_urls = [line.strip() for line in epg_file if line.strip()]
|
||||
processed_epg_list = ", ".join(epg_urls)
|
||||
head_playlist = f'#EXTM3U x-tvg-url="{processed_epg_list}"\n'
|
||||
|
||||
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"):
|
||||
continue
|
||||
with open(filename, encoding='utf-8') as markup_file:
|
||||
file_country = os.path.join("..", dir_playlists, "playlist_" + filename[:-3:] + ".m3u8")
|
||||
playlist_country = open(file_country, "w", encoding='utf-8')
|
||||
playlist_country.write(head_playlist + "\n")
|
||||
group = filename.replace(".md", "").title()
|
||||
markup_path = os.path.join(lists_dir, filename)
|
||||
country_path = os.path.join(dir_playlists, "playlist_" + filename[:-3] + ".m3u8")
|
||||
country_key = filename[:-3]
|
||||
group = country_key.replace("_", " ").title()
|
||||
country_code = COUNTRY_CODES.get(country_key, "")
|
||||
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:
|
||||
if "<h1>" in line.lower() and "</h1>" in line.lower():
|
||||
group = re.sub('<[^<>]+>', '', line.strip())
|
||||
if not "[>]" in line:
|
||||
if "[>]" not in line:
|
||||
continue
|
||||
channel = Channel(group, line)
|
||||
print(channel.to_m3u_line(), file=playlist)
|
||||
print(channel.to_m3u_line(), file=playlist_country)
|
||||
playlist_country.close()
|
||||
channel = Channel(group, line, country_code)
|
||||
m3u_line = channel.to_m3u_line()
|
||||
print(m3u_line, file=playlist)
|
||||
print(m3u_line, file=playlist_country)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
|||
3276
playlist.m3u8
3276
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