naveed010 has asked for the wisdom of the Perl Monks concerning the following question:

Greetings most gracious of monks.

Have any of you ever used perl for screen scraping? I play poker online at times and was wondering if I could write something that can access the software and grab the names of the players at my table, and feed that into a player stats website. Instead of looking up each player's stats at my table manually, I'd call the script and it would do it for me.

Never ceases to amaze me that I'll do some work to help me be lazier. :)

I would use WWW::Mechanize to fire off multiple HTTP requests to grab the stats for each player. I know I could download the software they have and install it but, I'd rather write something myself for sh#t's and giggles. :)

Thanks in advance for any input.

Replies are listed 'Best First'.
Re: Screen Scraping?
by moritz (Cardinal) on Jan 28, 2008 at 13:50 UTC
    Just go ahead and try it - WWW::Mechanize seems to be the right tool for the job.

    But please make sure to read the casino's Terms of Service before doing anything, because they might forbid something like that (and you should respect that). There might be privacy concerns as well.

      Thanks for the response, but, not exactly what I'm looking for. The Mechanize part is what I need for getting the other player's info from another website.

      When sitting at the table, (in particular, party poker) it's an actual graphic-based screen. I was wondering if there was a way to actually interface with the software to get that, or is there a way perl can actually read what is on my screen.

      Thanks again!

        actual graphic-based screen
        You have to be much more specific than that, else I just say that there exist tools and modules for inspecting and automating GUI applications, and it depends.
Re: Screen Scraping?
by Popcorn Dave (Abbot) on Jan 29, 2008 at 02:49 UTC
    This may be a longshot, but perhaps you should be looking at a captcha decoder. That might be a solution to your problem since you're trying to decode part of a graphic screen.


    Revolution. Today, 3 O'Clock. Meet behind the monkey bars.

    I would love to change the world, but they won't give me the source code

Re: Screen Scraping?
by budoka (Initiate) on Aug 13, 2009 at 14:52 UTC
    This is easily solved, read from the hand history of your poker client's dir. It's real-time updated.