34 lines
942 B
Python
34 lines
942 B
Python
|
|
|
|
class OriginChannels():
|
|
|
|
def __init__(self, fhdhr, origin):
|
|
self.fhdhr = fhdhr
|
|
self.origin = origin
|
|
|
|
self.base_api = 'http://watchnewson.com/api/linear/channels'
|
|
|
|
def get_channels(self):
|
|
|
|
channel_list = []
|
|
|
|
channels_json = self.fhdhr.web.session.get(self.base_api).json()
|
|
print(channels_json[0])
|
|
for channel_dict in channels_json:
|
|
|
|
clean_station_item = {
|
|
"name": channel_dict["title"],
|
|
# "callsign": channel_dict["name"],
|
|
# "number": channel_dict["formatted-number"],
|
|
"id": channel_dict["identifier"],
|
|
}
|
|
channel_list.append(clean_station_item)
|
|
|
|
return []
|
|
|
|
return channel_list
|
|
|
|
def get_channel_stream(self, chandict):
|
|
streamurl = None
|
|
return streamurl
|