mirror of
https://github.com/LaQuay/TDTChannels.git
synced 2024-11-22 17:03:24 +01:00
Update script
This commit is contained in:
parent
7696de898d
commit
6fb7e7bc78
4 changed files with 4 additions and 20 deletions
|
@ -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
|
|
@ -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
|
||||
}
|
||||
}
|
|
@ -1,7 +1,4 @@
|
|||
class Country:
|
||||
name = None
|
||||
ambits = []
|
||||
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
self.ambits = []
|
||||
|
|
|
@ -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(", ")
|
||||
|
|
Loading…
Reference in a new issue