test
This commit is contained in:
parent
7724d5fcd9
commit
e8532a1e7d
@ -22,7 +22,32 @@ class OriginChannels():
|
||||
|
||||
print(stirr_chan_list["channel"][0])
|
||||
|
||||
"""
|
||||
{
|
||||
'display-name': 'dco',
|
||||
'icon': {
|
||||
'src': 'https://komonews.com/resources/media2/16x9/full/180/center/90/44e3adac-d9ed-4f62-b8e7-3bc5d09d94cc-medium16x9_STIRR_LOGO_0220_STIRRCity_1920x1080_EPG.png?1581116303431?cb=eccbc87e4b5ce2fe28308fd9f2a7baf3'
|
||||
},
|
||||
'id': '0cf15df7-1dbc-4dac-bc8d-867e8ab3d3cf'
|
||||
}
|
||||
"""
|
||||
|
||||
channel_list = []
|
||||
for channel_dict in stirr_chan_list:
|
||||
|
||||
try:
|
||||
thumbnail = channel_dict["icon"]["src"].split("?")[0]
|
||||
except TypeError:
|
||||
thumbnail = None
|
||||
|
||||
clean_station_item = {
|
||||
"name": channel_dict["display-name"],
|
||||
"callsign": channel_dict["display-name"],
|
||||
# "number": str(channel_dict["number"]),
|
||||
"id": str(channel_dict["id"]),
|
||||
"thumbnail": thumbnail
|
||||
}
|
||||
# channel_list.append(clean_station_item)
|
||||
|
||||
return channel_list
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user