mirror of
https://github.com/Free-TV/IPTV.git
synced 2026-09-25 03:21:20 +02:00
Fix leftover M3U8 injection vector, missing country codes, README sync
- Sanitize the channel number field for embedded double quotes; the previous fix (#1124) covered group/name/logo/epg but missed tvg-chno, leaving the same attribute-injection vector open via the "#" column. - Add missing "kenya" and "nigeria" entries to COUNTRY_CODES so those channels get a tvg-country attribute in the generated playlist. - Sync README.md and flag_order.txt with lists/: add missing flags for chile, egypt, saudi_arabia, indonesia, kenya, nigeria in their proper geographic groups. - Add .gitignore for __pycache__/*.pyc.
This commit is contained in:
+3
-1
@@ -48,6 +48,7 @@ COUNTRY_CODES = {
|
||||
"israel": "IL",
|
||||
"italy": "IT",
|
||||
"japan": "JP",
|
||||
"kenya": "KE",
|
||||
"korea": "KR",
|
||||
"kosovo": "XK",
|
||||
"latvia": "LV",
|
||||
@@ -60,6 +61,7 @@ COUNTRY_CODES = {
|
||||
"monaco": "MC",
|
||||
"montenegro": "ME",
|
||||
"netherlands": "NL",
|
||||
"nigeria": "NG",
|
||||
"north_korea": "KP",
|
||||
"north_macedonia": "MK",
|
||||
"norway": "NO",
|
||||
@@ -100,7 +102,7 @@ class Channel: # pylint: disable=too-few-public-methods,too-many-instance-attri
|
||||
self.country_code = country_code
|
||||
md_line = md_line.strip()
|
||||
parts = md_line.split("|")
|
||||
self.number = parts[1].strip()
|
||||
self.number = parts[1].strip().replace('"', '')
|
||||
self.name = parts[2].strip().replace('"', '')
|
||||
self.url = parts[3].strip()
|
||||
self.url = self.url[self.url.find("(")+1:self.url.rfind(")")]
|
||||
|
||||
Reference in New Issue
Block a user