Screen Scraping Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jeffbg123

    Screen Scraping Question

    Hey,

    I am trying to make a bot for a flash game using python. However I am
    having some trouble with a screen scraping strategy. Is there an
    accepted way to compare a full screenshot with the image that I want
    to locate? It is a math based game, so I just have to check what
    number, 1-9, appears in the center of the flash game. Is there an
    easier method to do this?

    Thanks

    -Jeff

  • Dan Stromberg - Datallegro

    #2
    Re: Screen Scraping Question

    On Wed, 11 Jul 2007 12:45:21 +0000, jeffbg123 wrote:
    Hey,
    >
    I am trying to make a bot for a flash game using python. However I am
    having some trouble with a screen scraping strategy. Is there an
    accepted way to compare a full screenshot with the image that I want
    to locate? It is a math based game, so I just have to check what
    number, 1-9, appears in the center of the flash game. Is there an
    easier method to do this?
    >
    Thanks
    >
    -Jeff
    That sounds like an OCR problem, unless the numbers are so consistently
    rendered that you can just store copies of all 9 (I'd pick a non-lossy
    format) and compare.

    Comment

    • jeffbg123

      #3
      Re: Screen Scraping Question

      On Jul 11, 10:31 pm, Dan Stromberg - Datallegro
      <dstromb...@dat allegro.comwrot e:
      On Wed, 11 Jul 2007 12:45:21 +0000, jeffbg123 wrote:
      Hey,
      >
      I am trying to make a bot for a flash game using python. However I am
      having some trouble with a screen scraping strategy. Is there an
      accepted way to compare a full screenshot with the image that I want
      to locate? It is a math based game, so I just have to check what
      number, 1-9, appears in the center of the flash game. Is there an
      easier method to do this?
      >
      Thanks
      >
      -Jeff
      >
      That sounds like an OCR problem, unless the numbers are so consistently
      rendered that you can just store copies of all 9 (I'd pick a non-lossy
      format) and compare.
      The numbers are always rendered the same. So I don't know if OCR is a
      necessary step.

      Also, what if I just got the data from the packets? Any disadvantages
      to that? Any good python packet capturing libraries?

      Thanks

      Comment

      • Raul Laansoo

        #4
        Re: Screen Scraping Question

        Ühel kenal päeval, K, 2007-07-11 kell 12:45, kirjutas jeffbg123:
        Hey,
        >
        I am trying to make a bot for a flash game using python. However I am
        having some trouble with a screen scraping strategy. Is there an
        accepted way to compare a full screenshot with the image that I want
        to locate? It is a math based game, so I just have to check what
        number, 1-9, appears in the center of the flash game. Is there an
        easier method to do this?
        >
        Thanks
        >
        -Jeff
        >
        Maybe you can compare screenshots by the size, if they vary.

        Raul

        Comment

        • Yu-Xi Lim

          #5
          Re: Screen Scraping Question

          jeffbg123 wrote:
          The numbers are always rendered the same. So I don't know if OCR is a
          necessary step.
          >
          Also, what if I just got the data from the packets? Any disadvantages
          to that? Any good python packet capturing libraries?
          >
          Thanks
          >
          Packet capture is probably a bad idea for two reasons.

          1) It will give you a lot of packets you don't need and at a OSI layer
          so low that reassembly is painful. Try writing a HTTP or SOCKS proxy and
          get the Flash game to use that proxy.

          2) Many Flash games would probably store (in the Flash file) or generate
          their scenarios instead of retrieving them over the Internet.

          Comment

          Working...