mirror of
https://github.com/LaQuay/TDTChannels.git
synced 2025-04-07 01:45:50 +02:00
Add web to JSON
This commit is contained in:
parent
2f7dd65d9e
commit
1a93e62f6d
2 changed files with 9 additions and 1 deletions
script
|
@ -47,8 +47,9 @@
|
|||
def to_json(self):
|
||||
return {
|
||||
"name": self.name,
|
||||
"resolution": self.resolution,
|
||||
"web": self.web,
|
||||
"logo": self.logo,
|
||||
"resolution": self.resolution,
|
||||
"epg_id": self.epg_id,
|
||||
"options": self.__options_to_json__()
|
||||
}
|
||||
|
|
|
@ -30,10 +30,17 @@ def get_channels_from_part(text):
|
|||
list_to_iterate.remove("\n\n")
|
||||
for i in range(0, len(list_to_iterate), attributes_per_item):
|
||||
item_name = list_to_iterate[i].strip()
|
||||
|
||||
item_options = list_to_iterate[i + 1].strip()
|
||||
|
||||
item_web = list_to_iterate[i + 2].strip()
|
||||
if len(item_web) > 0 and item_web[0] != "-":
|
||||
item_web = stringbetween(item_web, "(", ")")
|
||||
|
||||
item_resolution = list_to_iterate[i + 3].strip()
|
||||
|
||||
item_logo = list_to_iterate[i + 4].strip()
|
||||
|
||||
item_epg = list_to_iterate[i + 5].strip()
|
||||
|
||||
item_options = item_options.split(" - ")
|
||||
|
|
Loading…
Add table
Reference in a new issue