2014-08-12, 01:31
Hi there, I am beginner in Python Development, I have managed to make my Addon Working but:
When going to, Video->Video Addons->TestPlugin, it takes little long to load, Its noting to worry about because it just opening website, and getting fresh links for videos(live tv with token) and showing it up as a list, with updated links every time when You are opening that addon,
I have couple of questions, I have tried doing it without python as an xml file, but i cannot use it because token is generated lets say once in couple of hours, so i would have to change update xml manually, or run python script with delay every 1 min, to keep those links updated,
But, i have several sources of one channel and is it any chance to make listings manually as a folders eg. Channel 1, Channel 2, etc...
and inside channel folders, if you go inside of it then run python script for resolving url for those channels?
Also if channel has wrong any of url will not go as a SCRIPT FAILED just let other channels to show up except broken ones maybe instead of
channel 1 - source 1 it would show channel 1 - source 1 failed or something??
Any thoughts? thanks, a lot.
Here is my example code for one of them:
I Was thinking if
When going to, Video->Video Addons->TestPlugin, it takes little long to load, Its noting to worry about because it just opening website, and getting fresh links for videos(live tv with token) and showing it up as a list, with updated links every time when You are opening that addon,
I have couple of questions, I have tried doing it without python as an xml file, but i cannot use it because token is generated lets say once in couple of hours, so i would have to change update xml manually, or run python script with delay every 1 min, to keep those links updated,
But, i have several sources of one channel and is it any chance to make listings manually as a folders eg. Channel 1, Channel 2, etc...
and inside channel folders, if you go inside of it then run python script for resolving url for those channels?
Also if channel has wrong any of url will not go as a SCRIPT FAILED just let other channels to show up except broken ones maybe instead of
channel 1 - source 1 it would show channel 1 - source 1 failed or something??
Any thoughts? thanks, a lot.
Here is my example code for one of them:
Quote:#Nickolodeon start
urlsNICKELODEON = "http://www.example.net/mobillinks/player.php?playerurl=http://111.22.242.126/streamer/?d=140289"
regextokensNICKELODEON = '<a href="(.+?)"><div class="btn_container">'
patternNICKELODEON = re.compile(regextokensNICKELODEON)
len(urlsNICKELODEON)
htmlfile = urllib.urlopen(urlsNICKELODEON)
htmltext = htmlfile.read()
videourlNICKELODEON = re.findall(patternNICKELODEON, htmltext)
videourlNICKELODEONstr = str(videourlNICKELODEON)
surlNICKELODEON = videourlNICKELODEONstr.replace("['", "")
surlNICKELODEON2 = surlNICKELODEON.replace("']", "")
li = xbmcgui.ListItem('NICKELODEON', iconImage='http://pixelatedpop.com/sites/default/files/u3/(Nick)NickShows.jpg')
xbmcplugin.addDirectoryItem(handle=addon_handle, url=surlNICKELODEON2, listitem=li)
#print surlNICKELODEON2
I Was thinking if
Quote: url=surlNICKELODEON2could be
Quote: url=execbuildin(NICKELODEON2.py)then if url would be taken of python resolver just before you press play on that stream list?