in reply to Poker Datamine

What's the purpose of the database? Are you hoping to calculate odds based on the past moves of the individuals at the table, or something like that? That could be interesting.

In any case, that's the easy part, if you can get the data. That'll depend on how it gets to the browser. If it's an HTML element being updated with Javascript/Ajax, you might be able to write your own little Javascript app to run in the browser and watch that element, watching for new lines that show up in it and saving them somehow. But if it's Java or some other kind of self-contained application, that won't work.

If you just wanted to save the info for future study, I guess you could do a video capture of that part of the screen and run it through OCR software later. But you want to write a bot, which means you need to get the data as it happens so the bot can act on it quickly. Another possibility would be to sniff the network traffic and pull the chat text out of that, assuming they don't encrypt it. Setting up a proxy server and having your browser connect through that might give you another place to grab it.

I would have guessed that they tried to design those sites/apps specifically to prevent bots from playing. I played for a while in very low-stakes game and determined that I could consistently make a few dollars an hour just by playing safe according to some simple odds, because most of the players are impulsive and bad. Not enough to make a living, and it was dreadfully dull. But if I wrote a bot to play for me, it could make that few dollars 24/7. So if they didn't prevent it, I'd think there would be lots of people doing it.

Aaron B.
Available for small or large Perl jobs; see my home node.

Replies are listed 'Best First'.
Re^2: Poker Datamine
by bennierounder (Sexton) on Oct 02, 2013 at 19:23 UTC
    Yes that's exactly what I want to do, the data I posted was an example of how it appears at each stage of the hand. I will be getting it in real time as the hand goes on and as players make decisions, but I need to know how to get the actions straight into a database.

    If you know of some other way I could scrape the data into an sql data base in real time I could just use perl after that.

    Then work out the rest once I get that far!

    Any site or literature you know I could study to learn this technique would be a great help!

    There are many people trying it out and as far as I know bots are not detectable unless you play at pokerstars/full tilt.

    However you can open any table from a seperate ip address and run the program on that if you need to play pokerstars or full tilt.

    This is for Ipoker and unlike pokerstars and full tilt the data is not encypted as far as I know because lots of sites sell this information already. They are obtaining it through scraping the data as I have explained. I just need to know how to do it any literature would be much appreciated.

    I have to go to work now, but I will update this post tomorrow with more information on the Ipoker software i.e what language its built in etc. It is an app on my computer though, so it may be saved in a floder somewhere. I'll look tomorrow gotta go.

      Well, as I said, it depends on how you're getting the data. If you're getting it in the browser with Javascript, then you might be able to save it to a local SQLite database, or connect to a server with Ajax and dump it into a database there. But a browser is limited for security reasons in what it can do on the local system and what servers it can contact other than the one already in the window. Perhaps there are ways around those limits; I don't know.

      On the other hand, if you're getting the data by sniffing your network traffic or sticking some kind of proxy between client and server, then that program could save it to a database. If the poker client is standalone, not browser-based, that seems like the most likely method.

      I don't have any resources to suggest, but I think you may want to try terms other than "scraping." Scraping normally means pulling web pages and mining data out of them one after another. You're not talking about web pages here; you might not be talking about the web at all. To scrape something, as I understand the term, you run a program that stands in for the client and grab what the server returns. That would be the ultimate way to run a bot -- have it connect in place of the official software -- but that's very unlikely to be possible. You need a way to run the poker software and get the chat stream that goes to it. Try doing your searches and adding "traffic sniff(ing|er)" and "proxy" to see if you find anything.

      I don't know how the sites that are selling it are doing it, or what they're calling "scraping." Could be any of the methods I mentioned, or something I haven't thought of. Maybe the sites make the table chat available via RSS, for all I know. I still doubt that a database of action more than a few hours old would be useful, but I could be wrong.

      Aaron B.
      Available for small or large Perl jobs; see my home node.