OZmium Sports Betting and Horse Racing Forums

OZmium Sports Betting and Horse Racing Forums (http://forums.ozmium.com.au/index.php)
-   General Topics (http://forums.ozmium.com.au/forumdisplay.php?f=59)
-   -   Import Tab Prices (http://forums.ozmium.com.au/showthread.php?t=31014)

Shaun 18th March 2016 04:52 PM

Import Tab Prices
 
I have hit a wall on what to do with this site, all i get with web queries is unsupported browser, hoping someone with more knowledge can get these in to excel.

https://www.tab.com.au/racing/meetings/today/R

If you can import these venues i will be able to import what i need.

blackdog1 18th March 2016 06:53 PM

Quote:
Originally Posted by Shaun
I have hit a wall on what to do with this site, all i get with web queries is unsupported browser, hoping someone with more knowledge can get these in to excel.

https://www.tab.com.au/racing/meetings/today/R

If you can import these venues i will be able to import what i need.
Don't waste your time Shaun it's not going to work, I used a different approach, not Excel and it no longer works.

You can sign up to receive data free as far as I know via an API?
Not important enough for me.

Shaun 18th March 2016 10:45 PM

Quote:
Originally Posted by blackdog1
Don't waste your time Shaun it's not going to work, I used a different approach, not Excel and it no longer works.

You can sign up to receive data free as far as I know via an API?
Not important enough for me.


I need a bigger Turnover from the Tab for that as it is only available to Silver and above.

I do have another option i have not tried, it won't be pretty but may work, i can write a script using AutoHotKey to create a browser then i can send the contents of that browser to a txt doc then import that to excel, it won't be fully dynamic but it just may get the info that i need, namely exotic payouts.

Shaun 19th March 2016 12:19 AM

How about we try to use the web browser controls built in to excel to access some of these pages we can't extract data from, i guess it depends on what type of updating you need, i wouldn't use it for live prices but would work for results,scratchings and things like that, i am not sure at this point in time how to get the info from the page to a sheet, but am sure it can be done.

Shaun 19th March 2016 04:30 AM

Is a bit dirty right now but am sure i can add a bit more functionality to it.

Code:
Sub CopyWebPage() Dim ieApp As Object Dim URL As String URL = "https://www.tab.com.au/racing/2016-03-18/ALBURY/ALB/R/7" Set ieApp = CreateObject("Internetexplorer.Application") ieApp.Navigate URL ieApp.Visible = True While ieApp.Busy And ieApp.ReadyState <> 4: DoEvents: Wend Application.Wait (Now + TimeValue("00:00:05")) 'Select All ieApp.ExecWB 17, 0 'Copy to the clipboard ieApp.ExecWB 12, 0 ieApp.Quit End Sub

This just copies the page, you need to add to it to paste it in excel, you will see a browser open and it waits 5 seconds for the page to load, this can be adjusted to less or more, once the contents copied the browser closes, if you choose not to see the browser change ieApp.Visible = True to False and you won't even see the browser but it will still copy the contents.

you could set up another timer so it runs every 30 seconds to give you some sort of price update.

Shaun 26th March 2016 10:38 PM

Seems recently the tab has been blocking some Amazon servers, or as they said specifically Telstra, not sure why but it made it hard for me to get access to the website from my server.

The script above worked fine from my pc but the only way to get access to the site from the server is to use chrome with the Hola browser addon.

Problem is excel doesn't play nice with chrome and i couldn't install the Hola addon to IE

Still a bit roughm but works.

Code:
Sub web() Shell ("C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe -url www.tab.com.au") Application.Wait (Now + TimeValue("00:00:20")) SendKeys "^a", True SendKeys "^c", True SendKeys "%{F4****" AppActivate "Microsoft Excel" Application.Wait (Now + TimeValue("00:00:5")) Range("A1").Select ActiveSheet.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:= _ False, NoHTMLFormatting:=True Range("A1").Select End Sub

blackdog1 30th March 2016 10:48 PM

Quote:
Originally Posted by Shaun
Seems recently the tab has been blocking some Amazon servers, or as they said specifically Telstra,

Shaun, I've been thinking about that line, since our discussion and I think what she meant was that Telstra provides servers as well, and we should be using local instead of Amazon.

Otherwise it makes no sense, Telstra can't just decide to put a global block on any website willy-nilly, unless the client asks for it.

I also contacted Amazon to ask how a physical setup in Sydney registers as located in the US, something doesn't jell here.
But as you know they are not very forthcoming with help for small fry like us.

I'm investigating a new service that was recommended by a reputable IT magazine, let you know in the usual way, how I go .

Shaun 30th March 2016 11:36 PM

Quote:
Originally Posted by blackdog1
Shaun, I've been thinking about that line, since our discussion and I think what she meant was that Telstra provides servers as well, and we should be using local instead of Amazon.

Otherwise it makes no sense, Telstra can't just decide to put a global block on any website willy-nilly, unless the client asks for it.

I also contacted Amazon to ask how a physical setup in Sydney registers as located in the US, something doesn't jell here.
But as you know they are not very forthcoming with help for small fry like us.

I'm investigating a new service that was recommended by a reputable IT magazine, let you know in the usual way, how I go .



I have no real idea on what's going on or why, the only way i could access the Tab from my server was to use Hola on chrome, IE was blocked from installing it, am sure i could have worked it out given time.

I started using a server when i was on wifi it was cheaper than running my wifi modem all day plus i like the separate environment for developing my excel sheets with out interfering with running programs.

After all this mess i looked in to VM Ware since i have an adsl connection now, yes it is not as fast as the amazon server but i can create virtual servers with more power at no cost, but will be interested in what you find as a permanent server is a better option because of connection speeds a fallback.


All times are GMT +10. The time now is 09:16 PM.

Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.