mirror of https://github.com/Free-TV/IPTV
Compare commits
4 Commits
a7d0a6022a
...
ff4ce752e9
| Author | SHA1 | Date |
|---|---|---|
|
|
ff4ce752e9 | |
|
|
43b8dced11 | |
|
|
8a67a85d1a | |
|
|
6b3abad44d |
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -15,19 +15,19 @@
|
|||
| 0 | AzStarTV | [>](http://live.azstartv.com/azstar/smil:azstar.smil/playlist.m3u8) | <img height="20" src="https://i.imgur.com/di3XX5L.png"/> | AzStarTV.ca |
|
||||
| 0 | AZTV Ⓢ | [>](https://www.tvkaista.net/stream-forwarder/get.php?x=AZTV) | <img height="20" src="https://i.imgur.com/snBMMeH.png"/> | AZTV.az |
|
||||
| 0 | Baku TV | [>](https://rtmp.baku.tv/live/bakutv_720p.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3b/Baku_TV_%282018%29.png/640px-Baku_TV_%282018%29.png"/> | BakuTV.az |
|
||||
| 0 | CBC | [>](https://stream.cbctv.az:5443/LiveApp/streams/cbctv.m3u8) | <img height="20" src="https://i.imgur.com/wVT0dwO.png"/> | CBC.az |
|
||||
| 0 | CBC Azerbaijan| [>](https://stream.cbctv.az:5443/LiveApp/streams/cbctv.m3u8) | <img height="20" src="https://i.imgur.com/wVT0dwO.png"/> | CBC.az |
|
||||
| 0 | CBC Sport Ⓖ | [>](https://mn-nl.mncdn.com/cbcsports_live/cbcsports/playlist.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/az/0/04/CBC_Sport_TV_loqo.png"/> | CBCSport.az |
|
||||
| 0 | Dünya TV Ⓢ | [>](https://www.tvkaista.net/stream-forwarder/get.php?x=Dunya) | <img height="20" src="https://upload.wikimedia.org/wikipedia/az/5/5d/D%C3%BCnya_TV_%282019-h.h.%29.png"/> | DunyaTV.az |
|
||||
| 0 | İctimai TV Ⓢ | [>](http://109.205.166.68/server124/ictimai_tv/index.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/%C4%B0ctimai_TV_%282021-h.h.%29.svg/470px-%C4%B0ctimai_TV_%282021-h.h.%29.svg.png"/> | IctimaiTV.az |
|
||||
| 0 | İdman TV Ⓢ | [>](http://109.205.166.68/server124/idman_az/index.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/az/thumb/8/88/%C4%B0dman_Az%C9%99rbaycan_TV_loqo_%282019-h.h.%29.png/640px-%C4%B0dman_Az%C9%99rbaycan_TV_loqo_%282019-h.h.%29.png"/> | IdmanTV.az |
|
||||
| 0 | İdman HD Azərbaycan Ⓢ | [>](http://109.205.166.68/server124/idman_az/index.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/az/thumb/8/88/%C4%B0dman_Az%C9%99rbaycan_TV_loqo_%282019-h.h.%29.png/640px-%C4%B0dman_Az%C9%99rbaycan_TV_loqo_%282019-h.h.%29.png"/> | IdmanTV.az |
|
||||
| 0 | Kanal S | [>](https://www.tvkaista.net/stream-forwarder/get.php?x=KanalS) | <img height="20" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/Kanal_S_%282022%29.png/616px-Kanal_S_%282022%29.png"/> | KanalS.az |
|
||||
| 0 | Mədəniyyət TV Ⓢ | [>](https://str.yodacdn.net/medeniyyet/index.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/commons/f/fc/M%C9%99d%C9%99niyy%C9%99t_TV_logo.png"/> | MedeniyyetTV.az |
|
||||
| 0 | Muz TV | [x]() | <img height="20" src="https://i.imgur.com/CjySP1V.png"/> | MuzTV.az |
|
||||
| 0 | Muz TV Azerbaijan|<img height="20" src="https://i.imgur.com/CjySP1V.png"/> | MuzTV.az |
|
||||
| 0 | Real TV | [>](https://www.tvkaista.net/stream-forwarder/get.php?x=RealTV) | <img height="20" src="https://i.imgur.com/e2KFL0R.png"/> | RealTV.az |
|
||||
| 0 | Space TV Ⓢ | [>](http://109.205.166.68/server124/space_tv/index.m3u8) | <img height="20" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Space_TV_loqosu_%282023-h.h.%29.png/296px-Space_TV_loqosu_%282023-h.h.%29.png"/> | SpaceTV.az |
|
||||
| 0 | TMB Azərbaycan | [>](https://www.tvkaista.net/stream-forwarder/get.php?x=TMBAzerbaijan) | <img height="20" src="https://upload.wikimedia.org/wikipedia/az/c/c2/TMB_TV_loqosu.png"/> |
|
||||
| 0 | Topaz 2 | [x]() | <img height="20" src="https://www.lyngsat.com/logo/tv/tt/topaz_tv_az.png"/> |
|
||||
| 0 | Xəzər Xəbər | [x]() | <img height="20" src="https://i.imgur.com/AuB8bnq.png"/> | XezerXeber.az |
|
||||
| 0 | Topaz 2 | | <img height="20" src="https://www.lyngsat.com/logo/tv/tt/topaz_tv_az.png"/> |
|
||||
| 0 | Xəzər Xəbər | <img height="20" src="https://i.imgur.com/AuB8bnq.png"/> | XezerXeber.az |
|
||||
|
||||
<h2>myvideo.az</h2>
|
||||
|
||||
|
|
@ -37,6 +37,6 @@
|
|||
|:---:|:--------------:|:-----:|:----:|:------:|
|
||||
| 0 | Xəzər TV Ⓢ | [>](https://www.tvkaista.net/stream-forwarder/get.php?x=Xezer) | <img height="20" src="https://upload.wikimedia.org/wikipedia/commons/a/a5/X%C9%99z%C9%99r_TV_%282023%29.png"/> | XezerTV.az |
|
||||
| 0 | Səhiyyə TV | [>](https://www.tvkaista.net/stream-forwarder/get.php?x=SehiyyeTV) | <img height="20" src="https://upload.wikimedia.org/wikipedia/az/thumb/c/cd/S%C9%99hiyy%C9%99_TV.png/640px-S%C9%99hiyy%C9%99_TV.png"/> | SehiyyeTV.az |
|
||||
| 0 | MCJ TV SHOP | [x](https://www.tvkaista.net/stream-forwarder/get.php?x=MCJTVShop) | <img height="20" src="https://tvtolive.com/wp-content/uploads/MCJ-TV-Shop-tvtolive.com_.jpg"/> |
|
||||
| 0 | MCJ TV SHOP | [(https://www.tvkaista.net/stream-forwarder/get.php?x=MCJTVShop) | <img height="20" src="https://tvtolive.com/wp-content/uploads/MCJ-TV-Shop-tvtolive.com_.jpg"/> |
|
||||
| 0 | VIP HD | [>](https://www.tvkaista.net/stream-forwarder/get.php?x=AZ_VIP) | <img height="20" src="https://tvtolive.com/wp-content/uploads/VIP-TV-tvtolive.com_.jpg"/> |
|
||||
| 0 | MTV Azerbaijan Ⓢ | [>](https://www.tvkaista.net/stream-forwarder/get.php?x=MTVAzerbaijan) | <img height="20" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/MTV_Az%C9%99rbaycan_%282022%29.png/622px-MTV_Az%C9%99rbaycan_%282022%29.png"/> | MTVAzerbaijan.az |
|
||||
|
|
|
|||
143
make_playlist.py
143
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()
|
||||
print(f"Generating {group}")
|
||||
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()
|
||||
|
|
|
|||
3268
playlist.m3u8
3268
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