2009-03-02, 11:23
Hello. I'm working on a vimeo script and in the testing stage I'm running into some problems with the xbmc player reading the URL to the FLV. Here's the code
Regarding the last two lines: the top method works, the bottom doesn't. What gives? The flvURL string and the string copied directly into the function appear to be exactly the same, but one just won't work.
Code:
import xbmc, xbmcgui, urllib
from xml.dom import minidom
clipID = str(3281558)
#get the XML data for the particular video and then parse it
requestURL = 'http://vimeo.com/moogaloop/load/clip:'+clipID+'/'
usock = urllib.urlopen(requestURL)
xmldoc = minidom.parse(usock)
usock.close()
#save the relevant info
request_signature = xmldoc.getElementsByTagName('request_signature')[0].firstChild.data
request_signature_expires = xmldoc.getElementsByTagName('request_signature_expires')[0].firstChild.data
#concat FLV location
flvURL = 'http://vimeo.com/moogaloop/play/clip:' + clipID + '/' + request_signature + '/' + request_signature_expires + '/?q=sd'
print 'clip id: ' + clipID
print 'sig: ' + request_signature
print 'sigex: ' + request_signature_expires
print flvURL[0:36]
print flvURL[36:]
xbmc.Player().play('http://vimeo.com/moogaloop/play/clip:3281558/b7f839c7601acda3a135c8a562efba64/1236013200/?q=sd')
#xbmc.Player().play(flvURL)
Regarding the last two lines: the top method works, the bottom doesn't. What gives? The flvURL string and the string copied directly into the function appear to be exactly the same, but one just won't work.