Olympic Coverage using the CBC Plug

I started looking into added Olympic feeds into the cbc channel.  The plugin currently pulls in feeds from http://www.cbc.ca/player/ and the new olympic feeds appear to be coming from http://olympics.cbc.ca/online-listing/index.html.  

 

I am using private internet access to gain access for the cbc feeds, but would love to be able to watch the olympic coverage, which seems to be way better than nbc's coverage.

 

I'm pretty new at channel development and am not sure how long this will take me.  Hopefully will be done before the olympics end...

 

If anyone else has looked into this let me know.  

Looking at the python code in the plugin, you need the address of the olymjpic feed. I poked around a little, but I can't find it.

this is the current code:

SHOWS_LIST = 'http://cbc.feeds.theplatform.com/ps/JSON/PortalService/2.2/getCategoryList?PID=_DyE_l_gC9yXF9BvDQ4XNfcCVLS4PQij&field=ID&field=title&field=parentID&field=description&customField=MaxClips&customField=ClipType&query=ParentIDs|%s'
VIDEOS_LIST = 'http://cbc.feeds.theplatform.com/ps/JSON/PortalService/2.2/getReleaseList?PID=_DyE_l_gC9yXF9BvDQ4XNfcCVLS4PQij&query=CategoryIDs|%s&sortDescending=true&endIndex=500'

I was able to grab all of the urls with videos on the page.  It looks like they are doing something strange where the video loads after the initial page load.  Im not really sure how to grab the video for plex.  Here is the code I wrote that grabs the video pages.

def OlympicVideos():
oc = ObjectContainer(title2=‘Olympics’)
data = HTML.ElementFromURL(‘http://olympics.cbc.ca/online-listing/index.html’)
events = data.xpath(’//div[@class=“cust-tvl-summary”]’)
for event in events:
if event.xpath(‘child::a’):
Log('EVENT: '+event.xpath(‘child::a’)[0].attrib[‘href’])
title = event.xpath(‘child::h5[@class=“cust-tvl-title”]’)[0].text
url = event.xpath(‘child::a’)[0].attrib[‘href’]
oc.add(VideoClipObject(url=url, title=title, summary=title))
return oc

I thought I had written a response to this yesterday but it doesn't seem to show up here ... not sure why.

To see exactly what the channel framework sees you should be trying to load the URLs in question with curl (command line utility).  Lots of times videos are added after the fact with javascript and such, and the channel framework doesn't actually process javascript when it loads URLs ... so in those cases you might need to dig a little deeper to figure out more of the video specifics.

Best thing to do is to dig around a bit in the Services.bundle to see examples of how some other stuff like this is done.  A lot of times they go back to the way certain CDNs provide the videos and you can use similar approaches for all sites using the same CDN.

Hope this helps.  

Guys, I am traveling to USA in the coming days and I want to Watch Olympics Online 2016. Please tell if anyone of you know about how to access cbc for Watching Opening Ceremony.

This would be sweet. Any chance someone has managed to get this working?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.