Sign in to follow this  
Followers 0
ollivier44

Parsing betting exchange web site ?

15 posts in this topic

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.

Share this post


Link to post
Share on other sites



welcome to autoit

cek this out for bot/robot

about bot

see you around ;)

Share this post


Link to post
Share on other sites

OK, thanks, I don't know about this.

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 Regulations

Gambling Commission

Edited by ShawnW

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

OK to use the clipGet() to retrieved the data but how can I put the data into the clipboard automaticaly and without CTRL C ?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

thank you for your reply about the API but I will not know how to use it.

Share this post


Link to post
Share on other sites

I try this function and it looks great : _IETagNameAllGetCollection

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0