StreetFire.net
#1
hi all,

i've started working on a script to bring streetfire.net video streaming into xbmc, as a personal challenge to learn python and xbmc scripting.

as it is my first time in python scripting, i been reading a lot, and also took some ideas and code mainly from ooba.py and youtube.py, but i really don't understand how the xbmc.player should work because i can play some video streams and others don't.

this particular site seems pretty similar to youtube:
- each video has a unique id and a html page with that as name.
- something like a session id is asigned to you each time you open that page.

so, i wrote the following code to test it but really don't understand why it doesn't work:

Quote:import xbmc, xbmcgui
import urllib, urllib2, re, os

try: emulating = xbmcgui.emulating
except: emulating = false

#url = "http://200.73.177.44/alta"
#url = "http://videos.streetfire.net/video/f/e2891d19-7a53-4df7-8d17-4f747f5ac52c.htm"
url = "http://videos.streetfire.net/video/wm/e2891d19-7a53-4df7-8d17-4f747f5ac52c.htm"

f = urllib.urlopen(url)
content = f.read()

#videourl = re.compile('["]flashvars["] value=["](.[^">]*)["]><',re.ignorecase).findall(content)
#videourl = "http://videos.streetfire.net/ffplayer.swf?" + videourl[0]

videourl = re.compile('<embed(.*) src="http:\/\/(.[^"]*)" ',re.ignorecase).findall(content)
videourl = "http://" + videourl[0][1]

print "newurl: " + videourl

xbmc.player().play(videourl)

f.close()


any ideas ?
any help will be appreciated.

thank you !!
Reply

Logout Mark Read Team Forum Stats Members Help
StreetFire.net0