diff --git a/script/channel.py b/script/channel.py index f5bab2d3..9cd670dd 100644 --- a/script/channel.py +++ b/script/channel.py @@ -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__() } diff --git a/script/my_script.py b/script/my_script.py index bd357298..04df0a50 100644 --- a/script/my_script.py +++ b/script/my_script.py @@ -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(" - ")