Open GoogleCodeExporter opened 8 years ago
Reposting without ^M on each line for clarity:
def play():
smilurl=common.args.url
swfUrl = 'http://www.syfy.com/_utils/video/codebase/pdk/swf/flvPlayer.swf'
data = common.getURL(smilurl)
tree=BeautifulSoup(data, convertEntities=BeautifulSoup.HTML_ENTITIES)
print tree.prettify()
items=tree.find('switch').findAll('video')
hbitrate = -1
sbitrate = int(common.settings['quality']) * 1024
for item in items:
bitrate = int(item['system-bitrate'])
if bitrate > hbitrate and bitrate <= sbitrate:
hbitrate = bitrate
playpath = item['src']
if 'http:' in playpath:
finalurl = playpath
else:
# still could fail here, but if it does theres nothing we could do anyway.
rtmpbase = tree.find('meta')['base']
if '.mp4' in playpath:
playpath = 'mp4:'+playpath
else:
playpath = playpath.replace('.flv','')
finalurl = rtmpbase+' playpath='+playpath + " swfurl=" + swfUrl + " swfvfy=true"
item = xbmcgui.ListItem(path=finalurl)
xbmcplugin.setResolvedUrl(pluginhandle, True, item)
Original comment by rfdr...@gmail.com
on 18 Feb 2012 at 10:05
Original issue reported on code.google.com by
rfdr...@gmail.com
on 18 Feb 2012 at 10:04