test
This commit is contained in:
parent
1506feaa0a
commit
0d527a109d
@ -37,8 +37,12 @@ class OriginChannels():
|
||||
|
||||
stream_id_info_path = 'assets/asset/%s.json?f=title&f=providers&f=descriptions&f=runtime&f=availableSince' % str(stream_id)
|
||||
stream_id_info_url = self.base_api + stream_id_info_path
|
||||
streamurl = self.fhdhr.web.session.get(stream_id_info_url).json()
|
||||
print(streamurl)
|
||||
stream_id_info_json = self.fhdhr.web.session.get(stream_id_info_url).json()
|
||||
streamurls = []
|
||||
for provider in stream_id_info_json["providers"]:
|
||||
for source in provider["sources"]:
|
||||
streamurls.append(source["uri"])
|
||||
streamurl = streamurls[0]
|
||||
# if self.fhdhr.config.dict["origin"]["force_best"]:
|
||||
# streamurl = self.m3u8_beststream(streamurl)
|
||||
return streamurl
|
||||
@ -59,3 +63,36 @@ class OriginChannels():
|
||||
return bestStream.absolute_uri
|
||||
else:
|
||||
return m3u8_url
|
||||
|
||||
|
||||
"""
|
||||
{
|
||||
'id': 'XM0IFYLJ0RMD0X',
|
||||
'contentType': 'SIMULCAST',
|
||||
'title': 'CBS News',
|
||||
'descriptions': {
|
||||
'medium': "CBSN offers original, up-to-the-minute coverage of national and global stories with dynamic on-demand video content, including video from CBS News' extensive archives."
|
||||
},
|
||||
'availableSince': 'Tue, 20 Dec 2016 23:25:37 +0000',
|
||||
'providers': [
|
||||
{
|
||||
'title': 'CBSN',
|
||||
'id': 42,
|
||||
'color': 'rgba(48,129,180,1)',
|
||||
'sources': [
|
||||
{
|
||||
'uri': 'https://dai.google.com/linear/hls/event/Sid4xiTQTkCT1SLu6rjUSQ/master.m3u8?iu=/8264/vaw-can/ott/cbsnews_xumo&description_url=https://xumo.tv&ppid=&url=com.xumo.app&rdid=&idtype=&is_lat=&msid=&an=com.xumo.app',
|
||||
'bitrate': 3009,
|
||||
'width': 1280,
|
||||
'height': 720,
|
||||
'lang': 'en',
|
||||
'produces': 'application/x-mpegURL'
|
||||
}
|
||||
],
|
||||
'sunrise': 'Thu, 1 Jan 1970 00:00:01 +0000',
|
||||
'sunset': 'Tue, 19 Jan 2038 03:14:07 +0000'
|
||||
}
|
||||
],
|
||||
'type': 'Asset'
|
||||
}
|
||||
"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user