ollivier44 Posted August 24, 2010 Share Posted August 24, 2010 Hello, I would like to retrieve and parse data from this web site http://greyhounds.betfair.com/. (name and time of the markets, name and number of selections and odds of back and lay) How can I do ? thanks for your reply. Ollivier. Link to comment Share on other sites More sharing options...
rvn Posted August 24, 2010 Share Posted August 24, 2010 welcome to autoitcek this out for bot/robotabout botsee you around Link to comment Share on other sites More sharing options...
ollivier44 Posted August 24, 2010 Author Share Posted August 24, 2010 OK, thanks, I don't know about this. Link to comment Share on other sites More sharing options...
ShawnW Posted August 24, 2010 Share Posted August 24, 2010 (edited) Honestly I fail to see how parsing data from a website could count as a bot. It is not a video game, and he is only gathering information not automating anything. Although I would probably use php for this if you have access to your own host server or if you install php and apache locally.Edit: Even if he does intend to automate the betting process, here are links to the rules of the website and the UK gambling commision. Show me where it says that is not allowed.Betfair Rules and RegulationsGambling Commission Edited August 24, 2010 by ShawnW Link to comment Share on other sites More sharing options...
ollivier44 Posted August 24, 2010 Author Share Posted August 24, 2010 ShawnW, I think like you. Use php or install php is probably too difficult for me I will try with Autoit and perharps with the clipboard function... Link to comment Share on other sites More sharing options...
ShawnW Posted August 24, 2010 Share Posted August 24, 2010 The key to parsing data is regular expressions. They may look intimidating but they are actually very easy once you learn the syntax of the basic operations. The hard part is figuring out what to look for. You need to pull the source html into a string, then physically read through and study what you get. Find something in common with the areas you need data from and write regular expressions to find those areas. Use groups in the regular expressions to gather the variable data you are looking for.For example.You may notice that the html for a race looks like<div ...SomeAttributes... class="content">...some useful info...</div>Lets say every race is in this format. You could write a regular expression search for the div and capture what is inside it. Link to comment Share on other sites More sharing options...
rvn Posted August 24, 2010 Share Posted August 24, 2010 if not for bot or cheat then there nothing to sorry about,,, but you know, they just always ask something bout how to automate browser things...ShawnW got the answer,,, get the source,,, use regular expressions...for simple option,,, you can use _StringBetween in string UDF... Link to comment Share on other sites More sharing options...
ollivier44 Posted August 24, 2010 Author Share Posted August 24, 2010 It's look easy but I don't know php. Do you think I could use Autoit or not . The data I want to get in the site is not in the html source. I can gather them when I put them manually into the clipboard (CTRL A to select all data, CTRL C to copy them into clipboard and CTRL V to paste them into a string. It is probably the first step to do... Link to comment Share on other sites More sharing options...
ollivier44 Posted August 24, 2010 Author Share Posted August 24, 2010 It's look easy but I don't know php. Do you think I could use Autoit or not . The data I want to get in the site is not in the html source. I can gather them when I put them manually into the clipboard (CTRL A to select all data, CTRL C to copy them into clipboard and CTRL V to paste them into a string. It is probably the first step to do... Link to comment Share on other sites More sharing options...
ShawnW Posted August 24, 2010 Share Posted August 24, 2010 Yes you can use regular expressions to get the data even in autoit.If it is not in the source than it is probably dynamically loaded. There are ways to get that, but if CTRL+A CTRL+C works than you could do that too. You can use ClipGet() to retrieve the data from the clipboard into a string. You still have to study that string to find the best way to get the data you want. Link to comment Share on other sites More sharing options...
ollivier44 Posted August 24, 2010 Author Share Posted August 24, 2010 OK to use the clipGet() to retrieved the data but how can I put the data into the clipboard automaticaly and without CTRL C ? Link to comment Share on other sites More sharing options...
JohnOne Posted August 24, 2010 Share Posted August 24, 2010 I dout you will be getting odds and such from that website just using regex, because they are not in the source of that page, or in the source of each race. there is just tons of script to retrieve them. If you are not familiar with web page coding and suchlike I'd suggest you find another site to gather the info you need. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted August 24, 2010 Share Posted August 24, 2010 On a brighter note, it looks like there is an API available http://bdp.betfair.com/index.php?option=com_content&task=view&id=33&Itemid=62 So you might be able to make use of that. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ollivier44 Posted August 24, 2010 Author Share Posted August 24, 2010 thank you for your reply about the API but I will not know how to use it. Link to comment Share on other sites More sharing options...
ollivier44 Posted August 24, 2010 Author Share Posted August 24, 2010 I try this function and it looks great : _IETagNameAllGetCollection Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now