PDA

View Full Version : 'Old' TAB Live Odds Web Service has ended + VBA Issue


Neurokahuna
19th December 2012, 10:21 PM
I am gutted. I only used to download the Meeting Summary xml feed from VicTab's 'old' web service to build a race list of a given day's races and it suddenly stopped working.....Couldn't for the life of me work out why until I read on their Support pages (http://nettab.custhelp.com/app/answers/detail/a_id/258/~/tab-live-odds-web-service) that it is all over.

We now have to use their proper web service suite', which doesn't look easy for Excel/VBA developers.

I tried playing around with XQuery to see if the Tatts.com xml feeds have the necessary information, but it doesn't seem to have it all for any given date (i.e. 06/11/2012)

Does anyone else know where I can get a list of the day's races from in a list format inclduing Time, Track, Race #, Race Name and Class for any given date please?

God forbid my punting days come to an end because of this.... :-)

Shaun
20th December 2012, 12:22 AM
This any good to you?

http://www.ozbet.com.au/UI/RacingUI/RaceSchedule.aspx?fixtureDate=19122012

Martinw
20th December 2012, 06:42 AM
I agree the service is too hard to be a service. Getting past the security is my problem. And I do not see why they have it. How many people are actually accessing it? I think that they have made it too hard to use
Martin

UselessBettor
20th December 2012, 07:50 AM
Web services are a standard approach in the industry. I can fully understand why they did this. There are a lot of people ripping off their data with no gain to them (ie, they don't bet with the tab).

Betfair uses the exact same method (web services), it is just that there are a lot more examples of how to access the betfair services then the tab's.

It shouldn't be too hard to get the data in excel and there would be 1000's of examples of how to use a web service out there.


And I do not see why they have it. How many people are
actually accessing it?


how many web sites do you see showing tab prices? There would be thousands and none of these sites bet. They just show the odds.

This is what they are trying to discourage.

Neurokahuna
20th December 2012, 07:54 AM
Thanks Shaun.

I knew you would know the drum on where to get the data.

I played around with regular web queries and it grabbed the schedule nicely but I may need to include some VBA to get both the main race schedule and the Meeting Code list as well. The web query doesn't pull it in for some reason.

If I then throw in a simple vlookup formula I should be back in business...I'll post the code snippet if and when I get it working.

Thanks again

stugots
20th December 2012, 11:02 AM
Web services are a standard approach in the industry. I can fully understand why they did this. There are a lot of people ripping off their data with no gain to them (ie, they don't bet with the tab).

Betfair uses the exact same method (web services), it is just that there are a lot more examples of how to access the betfair services then the tab's.

It shouldn't be too hard to get the data in excel and there would be 1000's of examples of how to use a web service out there.



how many web sites do you see showing tab prices? There would be thousands and none of these sites bet. They just show the odds.

This is what they are trying to discourage.


Unfortunately they have done it at the expense of their end users, most of whom do not have the programming knowledge necessary to make sense of the gobly gook that is the 'web services' approach they have decided upon.

No doubt some bright spark will cash in shortly with 'pay for' app of some sort that will allow us mugs to once again integrate the Tab site with Excel, at present it is complicated beyond belief, even their own people struggle with offering any useful advice or a logical approach to take.

Shaun
20th December 2012, 04:17 PM
Unfortunately they have done it at the expense of their end users, most of whom do not have the programming knowledge necessary to make sense of the gobly gook that is the 'web services' approach they have decided upon.

No doubt some bright spark will cash in shortly with 'pay for' app of some sort that will allow us mugs to once again integrate the Tab site with Excel, at present it is complicated beyond belief, even their own people struggle with offering any useful advice or a logical approach to take.


This is my point, i don't mind them doing it because they need to protect there product but at least they could have knowledge of how it works and examples of how we can use it.

stugots
20th December 2012, 04:31 PM
Indeed Shaun & why I believe much like Betfair issues API licences, the TAB will end up doing something similar as I fail to see anyone using their web services other than the small number of people with the necessary programming background.

The Tab's web services introduction has been handled appallingly, someones head really should be on the chopping block.

Puntz
20th December 2012, 05:21 PM
I do confess, and laugh about it now when i spat the dummy cos of technological data feed changes, (teletext via t.v. aerial), therefore making this "you bute" live odds program useless unless it went through major surgery for internet feed.
The programmer/s simply had enough to. It takes TIME, to test after test after test and just when ya think ya got it right, another change.

One thing does stay constant, the same live data feed is still available, by subscription, but ya get continuity and quality.

It's all in the mindset for most of us with limited programming insight. Not that we are any less, we punters are actually the grass roots architects of infrastructure when it comes to our respective racing methods. Our ideas reign superior through trial and error just to process sums quick enough before the jump.
On the other side of da coin, is the suppliers of that data feed and therein lies the catch 22, all this has a cost, energy is consumed all the way from the farmer supplying grain for the winning horse to the waitress serving the lucky ones at the hoyty-toyty 5 star rump steak diner.
Soooo, the days of scraping may be numbered, but a solution is not that big deal to explore.
There is a solution to get them live odds to excel, but....it may cost.

Or, go to the track n back to basics.

stugots
20th December 2012, 05:29 PM
Yep there's a cost for everything, but all I would add is last time I checked the Tab withholds ~14%-20% of every dollar I bet with them, one would think that might just cover their 'expenses'...

Neurokahuna
20th December 2012, 11:32 PM
I gotta agree with Shaun's comments that it is fair enough for the totes to protect their services and data products, but please provide some samples so we can get an idea of how to use them in say, Excel, without having to become a whizz overnight in VS2010 to master C#, & SOAP web services.

Tatts Racing did a great job of this by providing a simple little Excel file that used their xml feed. It was a brilliant marketing idea to get weekend warriors up and running with their own little 'systems'.

My point is that if a company sets out (intentionally or unintentionally) to make life difficult for their customers, those same customers will vote with their feet and go elsewhere to get what they need.

jose
21st December 2012, 07:38 AM
" Or, go to the track n back to basics. "

I actually tried that Puntz, as I live in SEQ I made it my business to get to every Saturday Metro meeting and a great deal of Sunday fixtures at the SC for roughly 10 or 11 months. This is going back about 2 years or so.
Worked handsomely for a while but the profits slowly dried up. too many distractions being one of the problems.

So, back to the computer in front of the Telly at home and the profits started to flow again.
Then, for no reason that I can grasp, about 12 months ago the profits started to dry up again, to the point where I am going to have to give them a spell for a while and collect my thoughts, and get a proper bank together. (too many distractions????)

Having said all that the Melb Carnival was great to me, but not enough to get me into profit territory for the year.

In fact my confidence was so low leading into the MC that I had a lousy $20 EW on Purple Moon, the horse that I had earmarked for the Cup 2 months beforehand.
Understand that this is coming from someone who has their top pick as a roving Banker with the Full Field for a half every year, and a fairly big slap EW as well.
Fair dinkum, I could have given myself a punch in the head.

Sooooooo, any help with the " Or, go to the track n back to basics. " would be greatly appreciated.
Cheers.

stugots
21st December 2012, 11:00 AM
Well at least it looks like Betfair is here to stay -

http://community.betfair.com/australian/go/thread/view/93998/29592915/new-australian-racing-website-and-details-of-beta-website-decommission

Puntz
21st December 2012, 04:39 PM
Jose, back to basics i meant it as a suggestion to an idea, not the rule.

jose
21st December 2012, 04:46 PM
I know Puntz, I know.
Was just getting a bit of phlegm off the old chest.

Puntz
21st December 2012, 08:21 PM
I'm keeping an eye on mayan fortune telling, 21, 12, 2 ,8, boxed trifecta.

stugots
23rd December 2012, 08:05 AM
Just out of interest I went to every Aussie racing forum I could find yesterday & each one has a thread on the new sites with approx 90% disapproval rate, people are not happy

lomaca
23rd December 2012, 09:53 AM
Just out of interest I went to every Aussie racing forum I could find yesterday & each one has a thread on the new sites with approx 90% disapproval rate, people are not happyI'm not surprised, the new site is the pits. Every move you make takes for ever. I do have a fast system and still takes at least 30 sec to load in the first place.

On top of that had to reinstall both IE and Firefox because they simply would not load the new site. Only Chrome did, now why am I not surprised by that?

And the PR guys have the hide to say they did it all to give us punters a better faster, interface, I think they called it a more enjoyable punting experience.
What a joke!

Lord Greystoke
23rd December 2012, 10:38 AM
Agreed.

It's a bit like being thrown into a digital swimming pool where the only option is to sink to the bottom. . . s l o w l y ?

My theory is they want us all to migrate to a slick n quick mobile version because they know,
That's where the quick bets, losses (profits?) will come from..
Hence they make the main site almost unusable.

All of which is about as unlikely as a Mayan armageddon I guess,
But had to put my 2 pennies worth in..
Ho Ho OHHH ! (Bal available = ZERO!!)

Cheers LG

stugots
23rd December 2012, 11:47 AM
Well whatever the reasons, they didn't think this through well at all - with all the recent controversies racing has had to deal with & now we have these websites...,

Goose & Golden Egg anyone?

lomaca
23rd December 2012, 12:11 PM
Well whatever the reasons, they didn't think this through well at all - with all the recent controversies racing has had to deal with & now we have these websites...,

Goose & Golden Egg anyone?I think the previous poster hit on the real reason, just fired up my tablet and I was ready to bet in less then 5 seconds NO..... kidding!

And it's only a small Android device running at a fraction of the speed of the main computer AND on a WIRELESS connection!
How'z that?

stugots
23rd December 2012, 12:23 PM
Just had a laugh to myself at all the future 12 year old's using their phones to hack into dad's tab account for a bit of fun, gotta love those mobile apps.

Shaun
23rd December 2012, 03:45 PM
Most companies have the sense to design 2 types of sites, one for pc use and the other for mobile.

I guess the TAB are trying to save a buck.

moeee
23rd December 2012, 07:08 PM
Dat new website da TAB got dare - Him pretty Flash Bro.

Neurokahuna
23rd December 2012, 10:42 PM
OK,

After wasting 4 frustrating days playing with Excel I finally worked it out. The secret ingredient was Excel's 'XML Maps'. I wish I found these things a long, long time ago.

If you know how to download the Raceday.xml file from the tatts.com site and save it to your local drive, you can kinda work it out from there (see the Excel example on the tatts.com site for more information, http://tatts.com/tattsbet_help/info/xml-excel-example)

What I did......
1) In cell A1 of Sheet 1, I entered '23/12/2012'
2) In cell A2 of Sheet 1, I entered this formula =text(a1,"YYYY/M/D")
3) In VBA Editor, I entered this code in the appropriate section of the macro.

'Example
'This is where the correctly formatted date is stored in Sheet1
RaceDate = Worksheets("Sheet1").Range("A2").Value

'This is the code that requests the xml file for the date displayed in cell A2
xmldoc.Load ("http://tatts.com/pagedata/racing/" & RaceDate & "/RaceDay.xml")

'Sample file response
'http://tatts.com/pagedata/racing/2012/12/23/RaceDay.xml (http://tatts.com/pagedata/racing/2011/10/5/RaceDay.xml)

'This is the code to save it to your C:\Drive
xmldoc.Save ("C:\Raceday.xml")

If you then follow this well-explained tutorial for creating and using XML Maps, you should be right.

http://www.jkp-ads.com/articles/xmlandexcel05.asp

The xml elements in the Raceday.xml file that I found most useful for creating a race schedule were:
-MeetingCode
-RaceTime
-RaceNo
-VenueName
-MeetingType

NOTE: You only need to do this once. When you change the date in Sheet 1, you right click on the XML Map, and select 'XML > Refresh XML data' from the options and it will update the race list accordingly. I've tried it on a few Saturdays going back and it works well.


I hope I've explained this adequately. I will endeavour over the next few days to get a sample file up on here for people to play with...it won't be elegant like Shaun's code, but it will enough to get ya started and to help y'all stick it right up tab.com.au :-)

Lord Greystoke
24th December 2012, 07:06 AM
Brilliant effort NeuroK - must be the 'specialist' on this here, now.

Cheers LG

PS love the handle mate.. sounds like you have bagged some billy big nut$ big uns using the Ns

Shaun
24th December 2012, 09:12 AM
It is easy enough to get what you need from the Unitab site, but using this method is it fast enough.

Neurokahuna
24th December 2012, 10:53 AM
OK.....Here is an updated copy of my simple spreadsheet that grabs each race from the Tatts'com xml feed. It uses those XML Maps I was talking about.

Note: If you are using Windows 7, it may not allow you to save a file to the C:\Drive. Just go into the VBA macro 'LoadMeetings' and change the reference for xmldoc.Save to the correct drive (i.e. xmldoc.Save("D:\RaceDay.xml").

Then go into the Schedule worksheet and right click on the XML Map and change the source to where RaceDay.xml is now being saved

Test Run
Seems to work fine on Excel 2010. I like the way it now includes Greyhounds and Trots by default. If you want only certain tracks or race Types, just go to the Schedule worksheet & use 'Clear Contents' to remove the unwanted races. Do NOT use Delete Rows as it will screw up the references in the Review worksheet.

Have a play with and let me know if you find any issues and I will do my best to rectify them. I have already set it up for 24/12/2012, but try changing the date and observe what happens to the race list. It is pretty fast now too. :-)

Shaun
24th December 2012, 01:51 PM
I am impressed, i have not had a lot to do with getting data this way but i like what i see and the speed is perfect.

Do you have an account with them and if so are you able to get other form info like this?

There was a time when there past form was available with out an account but that changed with the new site.

Neurokahuna
24th December 2012, 05:33 PM
Hi Shaun,

Thanks for the comments. I do have an account with them and can see the extra form info that you mentioned, which I get using a standard Web Query when I am logged in to the site. Otherwise, it just throws an error message and blank data.

Unfortunately, tatts.com don't have an xml feed for that info....yet. I reckon it is because it is 'behind closed doors', so to speak and that is why it isn't made public. Here is a sample I got jsut by clicking on a horse in today's race at Tamworth and I wasn't even logged in. http://tatts.com/racing/formguide.aspx?year=2012&month=12&day=24&meeting=NR&race=1#2. use a bit of smarts and you may be able to pull it off their site without even logging in....Might have a tinker with that on Xmas Day.

Having said that, I have a more advanced version of this file that uses some clever logic derived from the existing xml feeds to determine the winners in races, which is quite easy, but it is still a 'work-in-progress' for those damned elusive but appealing trifectas. :-)

Merry Xmas all.

Shaun
24th December 2012, 06:21 PM
I got the message about being logged in.

"you have not logged into your account for the past 30 days on this computer."

going by this part of it i say when you are logged in they use a cookie to flag your system.

Maybe i will open an account, if you get a chance could you copy an example of a form page and post it in an excel do so i can see what they offer in the way of details, thanks.

Neurokahuna
24th December 2012, 06:43 PM
Here you go Shaun,

What you will notice is how it seems to include some bizarre 'A' characters....the only thing I did different was clicked on a horse when in Firefox on a Mac....when I switched over to the PC to do it (VM on my Mac), it would do it again and returned the same message.....So I opened the Tatts racing screen whilst within the Web Query window and logged in then and then it worked...seems to need your credentials whilst within the Web Query window if that makes any sense.

Martinw
28th December 2012, 09:47 AM
Has anyone tried Subcriptiondata.com to get the data feed? The cost is quite high over time so that puts me off.

Ta,
Martin

Martinw
28th December 2012, 09:48 AM
Forgot to add - Are there any other feed services?

Ta,
Martin

stugots
28th December 2012, 11:19 AM
I expect there will be plenty soon enough as this seems to be all about squeezing a few more $$ out of punters.

$65 a month for an odds feed?? not in this lifetime

Puntz
29th December 2012, 07:22 PM
Not sure if this accurate, but subshcriptiondata services have the sole national distribution rights in some form or another. In otherwords, the numbers ya see on screen at pub, clubs and TAB's , the source of that info, i was told is subscriptiondata.
Where they get the "raw" data from, (wholesale) is probably not available to the general public.
What would be awesome is to have their "engine" and their demo software export to excel as part of the package. But no, they insist to employ the services of I.T. people ?

@ $65.00 pm, and ya new at it, then what's 10 months of trial n error in developing the shift from web scraping to guaranteed data, and possibly much more?
Cos you only need to make that connection between the subscription data engine and Eexcel once.

stugots
30th December 2012, 06:16 PM
Will keep scraping until I can scrape no more:)