[REQUEST] TVNZ OnDemand Video Plugin - Watch New Zealand Television?

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
stanley87 Offline
Skilled Python Coder
Posts: 561
Joined: Sep 2006
Reputation: 2
Location: Chch, New Zealand
Lightbulb  [REQUEST] TVNZ OnDemand Video Plugin - Watch New Zealand Television? Post: #1
Hi all,

This plugin would only be good for kiwi's really... but my gf would love me if someone made a plugin so she could watch her Shortland Street episodes.

the website is :http://tvnzondemand.co.nz/

I could have a go, i just see it uses Flash for videos and don't know how to get the video link from the html code...
find quote
stanley87 Offline
Skilled Python Coder
Posts: 561
Joined: Sep 2006
Reputation: 2
Location: Chch, New Zealand
Post: #2
object data="http://images.tvnz.co.nz/on_demand/images/player.swf" type="application/x-shockwave-flash" height="265" width="320" name="player" id="player"><param value="http://images.tvnz.co.nz/on_demand/images/player.swf" name="movie"><param value="always" name="allowScriptAccess"><param value="true" name="allowFullScreen"><param value="true" name="swLiveConnect"><param value="duration=3145&amp;cid=1432121&amp;title=red_bull_air_race_ep7&amp;previewURL=&amp;chapterURLs=http://download.tvnzondemand.co.nz/download/store1/flash/2007/shows/redbullairrace_2007_ep8_sm945752_part1.flv;http://download.tvnzondemand.co.nz/download/store1/flash/2007/shows/redbullairrace_2007_ep8_sm945752_part2.flv;http://download.tvnzondemand.co.nz/download/store1/flash/2007/shows/redbullairrace_2007_ep8_sm945752_part3.flv;http://download.tvnzondemand.co.nz/download/store1/flash/2007/shows/redbullairrace_2007_ep8_sm945752_part4.flv;http://download.tvnzondemand.co.nz/download/store1/flash/2007/shows/redbullairrace_2007_ep8_sm945752_part5.flv&amp;CG=ondemand-channel-one-distributor-img-genre-sport-international-series-redbullairrace2007-episode-redbullairraceep7&amp;co=nz" name="flashVars">

ahhahah, looks promising :-P

I may attempt myself... i hope XBMC can play flash vids Tongue
find quote
stanley87 Offline
Skilled Python Coder
Posts: 561
Joined: Sep 2006
Reputation: 2
Location: Chch, New Zealand
Post: #3
Yup, it can! woot! will have this plugin shortly!
it will be my first plugin so will see how it goes Big Grin
find quote
Sycophant Offline
Junior Member
Posts: 3
Joined: Nov 2008
Reputation: 0
Post: #4
Had any success with this?
find quote
Sycophant Offline
Junior Member
Posts: 3
Joined: Nov 2008
Reputation: 0
Post: #5
I see there are also XML feeds galore...

http://tvnzondemand.co.nz/search/atom_sk...&l=150&s=d

http://tvnzondemand.co.nz/content/eml_se..._skin.atom

Series XML is wrapped in <div id="video_feature_rss"> on each show's page
find quote
Sycophant Offline
Junior Member
Posts: 3
Joined: Nov 2008
Reputation: 0
Post: #6
The more I look at it, the more difficult it becomes - most videos aren't in the simple progessive form as above, most are streamed directly from the server by the SWF player - not an HTTP request at all.

I guess wifey can't watch Shortland St on the Xbox.
find quote
moonglow Offline
Junior Member
Posts: 8
Joined: Feb 2009
Reputation: 0
Post: #7
Any chance of this plugin happening? or it too messy? It would be a great way to avoid more freeview satelite dishes Smile
find quote
gerner Offline
Member+
Posts: 163
Joined: Apr 2004
Reputation: 0
Location: NZ
Post: #8
I was looking at this, are there any higher def streams available?
find quote
angusj Offline
Junior Member
Posts: 1
Joined: Aug 2009
Reputation: 0
Smile  Happy to give this a shot... Post: #9
Nerd If someone can explain how the value clauses are ordered in the following code, I can get to work on constructing a simple browser for this. A complete novice at Python, borrowed this section from the Joox script.

Have no problem specifying the mfind statement itself, its the ordered syntax that follows "value = m[index4+3:index6]" Or perhaps there is a better solution to scrape the episodes Confused?


#fill the title

index1 = m.find('href="./cat')

index2 = m.find('href="./id')

index3 = m.find('</a><br')

index4 = m.find('id/')

index5 = m.find('">')

index6 = m.find('"',index4)

if index1 != -1 or index2 != -1:

if index3 != -1:

tmp = CMediaItem() #create new item

tmp.id = counter



if index4 != -1:

#value = m[index4+3:index5]

value = m[index4+3:index6]

tmp.URL = 'http://video.stage6.com/' + value + '/.divx'



value = m[index5+2:index3]

tmp.name = value



counter = counter + 1

tmp.type = 'video'



else:

value = m[index1+7:index5]

tmp.URL = 'http://joox.net' + value



value = m[index5+2:index3]

tmp.name = value



counter = counter + 1

tmp.type = 'html_body-sidebar'



self.list.append(tmp)

counter = counter + 1

elif counter > 1:

index = m.find('</div>')

if index != -1:

return 0 #we are done



return 0
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,570
Joined: Oct 2003
Reputation: 138
Post: #10
value = m[index4+3:index6]

grabs everything after id/ (3 characters after the position pointed to by index4, which is the start of id/) up to index6, which is the first " after index4.

In this case it looks like it's grabbing from something that looks like this:

href="http://some.url/here/id/this_is_what_we_want"

index4 will point to the offset of id
index6 will be that last quote
and it'll extract this_is_what_we_want

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Post Reply