• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 20
[Request] TVNZ OnDemand
#16
Here, here, what a great effort. Works very well.

I don't suppose anyone here would like to do the same for TV3 in New Zealand:

http://ondemand.tv3.co.nz
Warren in Napier, NZ.
XBMC SVN on Ubuntu 9.04
HTPC: Zotac 9300-ITX motherboard, Thermaltake SD100 case, Intel Core 2 Duo E7400, 4GB RAM, LG Slim-line Blu-Ray drive, 500GB WD Green HDD, Philips MCE IR with Harmony 785 Remote
SERVER: VIA EPIA SN motherboard, Lian Li PC-A17 case, VIA C7 CPU, 1GB RAM, Ubuntu 9.04, Icy Dock Cages, LSI 8888ELP SAS/SATA RAID HBA, 8x 1TB WD Green HDD's RAID6
Sharp 46" 1080P LCD via HDMI | Denon AV Receiver via Optical
Reply
#17
How about you? Steps:

1. Look at the source of the webpage, and find a reliable way to get the video URLs. In the case of TV3 ondemand, it appears they have RSS feeds there - try and find them all (some are hidden - fiddle with the URLs and you'll find 'em.) This gives a reliable way to get the last 30 items in each category at least. Way better than scraping the site.

2. See how much info those feeds have, and whether it's enough to display a listing (eg URL, title, thumb present?)

3. Follow the URL and see what you get by viewing the webpage source - find and document the entity that contains the flash player and the flash URL - there may be a .smil file referenced somewhere.

4. Document as much of the above as possible.

All can be done without any python knowledge at all.
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
Reply
#18
Well, I've had a little look into this and have managed to get the RTMPE streams for TV3 content. Here's what I have so far:

The page http://ondemand.tv3.co.nz/tabid/56/default.aspx has links to categories that can be grabbed as separate pages for content links. So, for example, we can see for the "most watched" videos:

[HTML]<li class="item" ><a href="/default404.aspx?tabid=61" title="Most Watched" rel="nofollow">Most Watched</a></li>[/HTML]

If we now grab the page http://ondemand.tv3.co.nz/default404.aspx?tabid=61 we can see links to each of our available programs, for example for NCIS:

[HTML]<h4><a href="http://ondemand.tv3.co.nz/Season-7-Ep-10/tabid/59/articleID/1075/MCat/118/Default.aspx">NCIS</a></h4>[/HTML]

There's more info about each program in the block of HTML that can be grabbed, such as the season and episode number, episode title, episode description, runtime, etc. What we're after, though, unfortunately isn't in this page. We need to get the linked page above, http://ondemand.tv3.co.nz/Season-7-Ep-10...fault.aspx, to find our program ID in some JS:

Code:
var video ="/*transfer*07092010*HW026232";

We need the date and program ID from this line to grab our RTMPE stream. We also need to link to the SWF for client verification, and that's also in this page at:

Code:
var fo = new FlashObject("http://static.mediaworks.co.nz/video/3.1/videoPlayer3.1.swf?rnd="+random_num+"", "flashPlayerSwf", "640", "390", "10", "#000000");

One last bit of useful information is that we have streams available in 330K and 700K. I've already run a video in Chrome and dumped the memory, then gone through it with a hex editor to find the RTMPE URL format, so with this info we can now build our URL:

Code:
rtmpe://nzcontent.mediaworks.co.nz/tv3/_definst_/mp4:/transfer/07092010/HW026232_700K

From this we can create our command line for rtmpdump:

Code:
rtmpdump -r "rtmpe://nzcontent.mediaworks.co.nz/tv3/_definst_/mp4:/transfer/07092010/HW026232_700K" -W "http://static.mediaworks.co.nz/video/3.1/videoPlayer3.1.swf" -o HW026232_700.flv -V

Now the tricky part is creating an XBMC plugin with this info. I guess if nobody else writes it in the next few days, I may have to look into doing it myself!
Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
Reply
#19
I've now managed to cobble together a plugin for XBMC, but can't test it as TV3 OnDemand appears to be broken!

Once the site's working again, I'll test that the plugin works properly and post it here.
Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
Reply
#20
Nice work - typical timing on the downtime on tv3, huh Smile

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
Reply
#21
Hey JM - thx for the TVNZonDemand script - works a treat.

Mark - seems TV3onDemand is back up. Looking forward to this one as well.

Great work.
ZOTAC IONITX-D-E Intel Atom N330 Dual Core 1.6 GHz NVIDIA ION with LIVE on SSD (now updated to Nvidia Shield Pro (P2897)
Reply
#22
Jonathan, am I able to attach a file to this thread, and if so how do I go about doing it? My plugin's ready for people to test, and I've also created a fanart backdrop for your plugin if you're interested.
Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
Reply
#23
Not sure if you have attachment "rights" to the forum in general (the forum s/w seems crap in this regard). If you want you can commit it to the github repo (or I can do it for you) where the tvnzondemand one is being hosted.

PM me for details and I'll hook it up.

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
Reply
#24
I've just uploaded the first version of the TV3 plugin to GitHub. It's at:

http://github.com/dteirney/NZ-XBMC-Add-Ons

If anyone tries this out, please let me know if you have any problems with it. I'm hoping to create a new version this evening that can switch between TV3's default categories (which are scraped directly from the TV3 website) and a more structured, logical hierarchy in which channels, genres, categories, etc are separated.
Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
Reply
#25
A new version of the TV plugin's up at GitHub, with the aforementioned changes to give a new default hierarchical view (with an option to fallback to the categories listed as they are on the TV3 site).

All that's left now is the scraping of items categorised by TV Show, which may take a while as the HTML I'm grabbing from the TV3 site is all over the place!
Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
Reply
#26
Well, having sorted out scraping of HTML for my TV3 OnDemand plugin, I've now found, while poking around, that there's an index of RSS feeds that I may be able to use to simplify things at:

http://ondemand.tv3.co.nz/default404.aspx?tabid=74

If this has all the stuff I'm getting from the web pages, I'll update my script to use these feeds, as it'll be more resilient than the HTML soup that TV3 produce.
Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
Reply
#27
Last time I looked the feeds were limited to 30 items each unfortunately. Agreed they're way more resilient (and easier to work with) than the HTML scraping.

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
Reply
#28
markhoney Wrote:If anyone tries this out, please let me know if you have any problems with it. I'm hoping to create a new version this evening that can switch between TV3's default categories (which are scraped directly from the TV3 website) and a more structured, logical hierarchy in which channels, genres, categories, etc are separated.

I've given this a try and it fails after loading the connecting to network (Whatever it is) box in the middle of the screen. Then I get a popup saying the plugin failed.

Not sure if I downloaded it right as the GIT thingee is confusing. It does look like it's setup in it's folder the same as the TVNZ one though Huh
ZOTAC IONITX-D-E Intel Atom N330 Dual Core 1.6 GHz NVIDIA ION with LIVE on SSD (now updated to Nvidia Shield Pro (P2897)
Reply
#29
Hmmmmm, your XBMC is probably missing the BeautifulSoup Python script. It's in my install, at script.module.beautifulsoup.

I'll just see what I have to do to setup BeautifulSoup as a dependency, and then upload a new version in a few minutes.
Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
Reply
#30
markhoney Wrote:Hmmmmm, your XBMC is probably missing the BeautifulSoup Python script. It's in my install, at script.module.beautifulsoup.

I'll just see what I have to do to setup BeautifulSoup as a dependency, and then upload a new version in a few minutes.

Your probably right - never even heard of that script before. Looking forward to the updated version. Thx.
ZOTAC IONITX-D-E Intel Atom N330 Dual Core 1.6 GHz NVIDIA ION with LIVE on SSD (now updated to Nvidia Shield Pro (P2897)
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 20

Logout Mark Read Team Forum Stats Members Help
[Request] TVNZ OnDemand2