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...
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.
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.