Hi,
I am working on making a channel for a website that uses the Brightcove service. I need to get the values of the vars playerID, playerKey, and @videoPlayer. I have no problem getting playerID and playerKey, but @videoPlayer throws an error. If I hardcode the expected value, I get no error and everything is fine. So I assume it is something to do with the @ symbol. Does anyone have any suggestions to work around this?
################################################################################################### @route(PREFIX + '/showdocs') def ShowDocs(title, pass_url):#documentary level
oc = ObjectContainer(title2=title)
docElement = HTML.ElementFromURL(pass_url)
docTitle = docElement.xpath(’//h1[@class=“title”]’)[0].text
docSummary = docElement.xpath(’//head//meta[@property=“og:description”]’)[0].get(‘content’)
#VideoID = ‘2252754546001’
VideoID = docElement.xpath(’//param[contains(@name, “@videoPlayer”)]’)[0].get(‘value’)
PlayerID = docElement.xpath(’//param[contains(@name, “playerID”)]’)[0].get(‘value’)
PlayerKey = docElement.xpath(’//param[contains(@name, “playerKey”)]’)[0].get(‘value’)
vidURL = ‘http://c.brightcove.com/services/viewer/federated_f9?isVid=1&isUI=1&videoId=’+VideoID+’&playerID=’+PlayerID+’&playerKey=’+PlayerKey+’&domain=embed&dynamicStreaming=true’#menu level
oc.add(VideoClipObject(title = docTitle, url = vidURL, summary = docSummary))
return oc
- HTML/Javascript snippet from webpage
document.write('');
document.write('');
document.write('');
document.write('');
document.write('');
document.write('');
document.write('');