ALTERNATIVE SCRAPER

Please post any questions regarding the program here.

Moderator: 2020vision

ALTERNATIVE SCRAPER

Postby BERTRAND » Mon Jun 04, 2012 2:16 pm

I am trying to use the "Export to Excel" function to scrape the Sporting Life live prices. It works very well although the minimum refresh time is 1 minute. I am having a big problem with the horse names-as follows:-
Lady Of The House (IRE) 16 Beaten Favourite
Pippy 26
Roland 21
Dark Opal (IRE)
I just need the horse name on it's own and in a format such that VLOOKUP will work. I am aware of the functions LEFT/RIGHT/MID, but none of those does the job. Also I can't use the saddlecloth numbers because I have all the days races on the same sheet.
Can anyone help?
Bert
BERTRAND
 
Posts: 99
Joined: Thu Feb 03, 2011 4:15 pm

Postby negapo » Mon Jun 04, 2012 5:41 pm

You want to remove the "(IRE)", "Beaten Favourite", and the numbers?
If you make a list of words that you want to remove i can build a function to clean the names
negapo
 
Posts: 179
Joined: Thu Mar 19, 2009 1:17 pm
Location: Porto, Portugal

Postby osknows » Mon Jun 04, 2012 7:03 pm

Hi Bert,

It would be quicker to extract the data using VBA and fix the horse names at source. Most of the inbuilt Excel web scraping functions are really slow and often struggle to parse the data correctly if the html is not properly formed for output to a table.

Attached is a workaround using Excel formulae only that will clean the examples you've shown. I've split it into stages which (hopefully?) makes it more easy to follow :)

http://www.mediafire.com/?y9c4q81z9ba4rd8

Os
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby BERTRAND » Tue Jun 05, 2012 8:13 am

Thanks for the formulae Os. Just the job, actions explicit! I appreciate your
time.

There have been a few examples of Code to get the Sporting Life live prices, but nothing recently. Also, authors of such Code will get bombarded with requests everytime it needs updating!

Bert
BERTRAND
 
Posts: 99
Joined: Thu Feb 03, 2011 4:15 pm

Postby BERTRAND » Tue Jun 05, 2012 8:15 am

Thanks for your offer Negapo
Bert
BERTRAND
 
Posts: 99
Joined: Thu Feb 03, 2011 4:15 pm

Postby negapo » Tue Jun 05, 2012 9:08 am

Your welcome
negapo
 
Posts: 179
Joined: Thu Mar 19, 2009 1:17 pm
Location: Porto, Portugal


Return to Help

Who is online

Users browsing this forum: No registered users and 75 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.