Jump to content

Parsing betting exchange web site ?


Recommended Posts

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
Link to comment
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.

Link to comment
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...

Link to comment
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...

Link to comment
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...

Link to comment
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.

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...