mirror of
https://github.com/Free-TV/IPTV.git
synced 2026-09-29 21:25:44 +02:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
055bcf4191 | ||
|
|
f362385fcc |
@@ -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>
|
||||||
+4
-4
@@ -96,21 +96,21 @@ class Channel: # pylint: disable=too-few-public-methods,too-many-instance-attri
|
|||||||
"""A single channel entry parsed from a markdown list line."""
|
"""A single channel entry parsed from a markdown list line."""
|
||||||
|
|
||||||
def __init__(self, group, md_line, country_code=""):
|
def __init__(self, group, md_line, country_code=""):
|
||||||
self.group = group.replace('"', '')
|
self.group = group
|
||||||
self.country_code = country_code
|
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()
|
||||||
self.name = parts[2].strip().replace('"', '')
|
self.name = parts[2].strip()
|
||||||
self.url = parts[3].strip()
|
self.url = parts[3].strip()
|
||||||
self.url = self.url[self.url.find("(")+1:self.url.rfind(")")]
|
self.url = self.url[self.url.find("(")+1:self.url.rfind(")")]
|
||||||
self.logo = parts[4].strip()
|
self.logo = parts[4].strip()
|
||||||
self.logo = self.logo[self.logo.find('src="')+5:self.logo.rfind('"')].replace('"', '')
|
self.logo = self.logo[self.logo.find('src="')+5:self.logo.rfind('"')]
|
||||||
|
|
||||||
self.chno = self.number if self.number and self.number != "0" else None
|
self.chno = self.number if self.number and self.number != "0" else None
|
||||||
|
|
||||||
if len(parts) > 6:
|
if len(parts) > 6:
|
||||||
self.epg = parts[5].strip().replace('"', '')
|
self.epg = parts[5].strip()
|
||||||
else:
|
else:
|
||||||
self.epg = None
|
self.epg = None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user