diff --git a/script/ambit.py b/script/ambit.py index ceaf84a1..09c6b809 100644 --- a/script/ambit.py +++ b/script/ambit.py @@ -1,7 +1,4 @@ class Ambito: - name = None - channels = [] - def __init__(self, name, channels): self.name = name self.channels = channels @@ -30,4 +27,4 @@ class Ambito: return self.__channels_to_m3u8__() def __str__(self): - return self.name + return self.name \ No newline at end of file diff --git a/script/channel.py b/script/channel.py index 42cecc3b..92b90527 100644 --- a/script/channel.py +++ b/script/channel.py @@ -1,11 +1,4 @@ class Channel: - name = None - web = None - resolution = None - logo = None - epg_id = None - options = [] - def __init__(self, name, web, resolution, logo, epg_id): self.name = name self.web = web @@ -69,9 +62,6 @@ return info class Web: - format = None - url = None - def __init__(self, format, url): self.format = format self.url = url @@ -92,4 +82,4 @@ return { "format": self.format, "url": self.url - } + } \ No newline at end of file diff --git a/script/country.py b/script/country.py index b090946b..b302fc13 100644 --- a/script/country.py +++ b/script/country.py @@ -1,7 +1,4 @@ class Country: - name = None - ambits = [] - def __init__(self, name): self.name = name self.ambits = [] diff --git a/script/my_script.py b/script/my_script.py index fb327db3..75516385 100644 --- a/script/my_script.py +++ b/script/my_script.py @@ -65,7 +65,7 @@ def get_channels_from_part(text): return channel_list -page = requests.get('https://raw.githubusercontent.com/LaQuay/TDTChannels/master/README.md', +page = requests.get('https://raw.githubusercontent.com/LaQuay/TDTChannels/master/TELEVISION.md', headers={'Cache-Control': 'no-cache'}) content = str(page.text) @@ -149,7 +149,7 @@ international.add_ambit(Ambito("Internacional", get_channels_from_part(canales_i # Save data to JSON file json_file = open('./public/output/channels.json', "w+") -# TODO Anadir copyright +# TODO Add license json_file.write("[") json_file.write(json.dumps(spain.to_json())) json_file.write(", ")