Smartgambler
Pro-Punter

Go Back   OZmium Sports Betting and Horse Racing Forums > Public Forums > General Topics
User Name
Password
Register FAQ Search Today's Posts Mark all topics as read

To advertise on these
forums, e-mail us.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 18th March 2016, 03:52 PM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default 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.
__________________
One Drive

"If the corporates are treating you poorly , just go elsewhere."
"If they need you , they will soon find out."
"If you need them , you will soon find out."
--moeee
_______________________________________________
Reply With Quote
  #2  
Old 18th March 2016, 05:53 PM
blackdog1 blackdog1 is offline
Member
 
Join Date: Aug 2013
Posts: 177
Default

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.

Last edited by blackdog1 : 18th March 2016 at 05:57 PM.
Reply With Quote
  #3  
Old 18th March 2016, 09:45 PM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default

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.
__________________
One Drive

"If the corporates are treating you poorly , just go elsewhere."
"If they need you , they will soon find out."
"If you need them , you will soon find out."
--moeee
_______________________________________________
Reply With Quote
  #4  
Old 18th March 2016, 11:19 PM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default

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.
__________________
One Drive

"If the corporates are treating you poorly , just go elsewhere."
"If they need you , they will soon find out."
"If you need them , you will soon find out."
--moeee
_______________________________________________
Reply With Quote
  #5  
Old 19th March 2016, 03:30 AM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default

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.
__________________
One Drive

"If the corporates are treating you poorly , just go elsewhere."
"If they need you , they will soon find out."
"If you need them , you will soon find out."
--moeee
_______________________________________________
Reply With Quote
  #6  
Old 26th March 2016, 09:38 PM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default

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
__________________
One Drive

"If the corporates are treating you poorly , just go elsewhere."
"If they need you , they will soon find out."
"If you need them , you will soon find out."
--moeee
_______________________________________________
Reply With Quote
  #7  
Old 30th March 2016, 09:48 PM
blackdog1 blackdog1 is offline
Member
 
Join Date: Aug 2013
Posts: 177
Default

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 .
Reply With Quote
  #8  
Old 30th March 2016, 10:36 PM
Shaun Shaun is offline
Member
 
Join Date: Jan 1970
Location: Western Australia
Posts: 3,456
Default

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.
__________________
One Drive

"If the corporates are treating you poorly , just go elsewhere."
"If they need you , they will soon find out."
"If you need them , you will soon find out."
--moeee
_______________________________________________
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump



All times are GMT +10. The time now is 11:08 PM.


Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2008 OZmium Pty. Ltd. All rights reserved . ACN 091184655