473,388 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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

Jul 11 '07 #1
4 2337
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.

Jul 12 '07 #2
On Jul 11, 10:31 pm, Dan Stromberg - Datallegro
<dstromb...@datallegro.comwrote:
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

Jul 12 '07 #3
Ü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

Jul 13 '07 #4
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.
Jul 14 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Roland Hall | last post by:
Am I correct in assuming screen scraping is just the response text sent to the browser? If so, would that mean that this could not be screen scraped? function moi() { var tag = '<a href='; var...
3
by: Jim Giblin | last post by:
I need to scrape specific information from another website, specifically the prices of precious metals from several different vendors. While I will credit the vendors as the data source, I do not...
1
by: niv | last post by:
Hello, I would like to screen scrape certain parts of a webpage...how can I do this in asp.net For instance.... a stockticker thats embeded on a webpage.. I dont want the entire page.. I...
4
by: rachel | last post by:
Hello, I am currently contracted out by a real estate agent. He has a page that he has created himself that has a list of homes.. their images and data in html format. He wants me to take...
2
by: Victor | last post by:
I'm doing screen scraping by retrieving data from one site and entering into another site. I have a problem with logging into the site. User name and password field contain 'name' property, and...
4
by: different.engine | last post by:
Folks: I am screen scraping a large volume of data from Yahoo Finance each evening, and parsing with Beautiful Soup. I was wondering if anyone could give me some pointers on how to make it...
3
by: WFDGW2 | last post by:
I want to write or obtain C++ code that will scrape text from a dialog box within a poker client, and then record that text somewhere else. What do I do? Thanks.
3
by: bruce | last post by:
Hi... got a short test app that i'm playing with. the goal is to get data off the page in question. basically, i should be able to get a list of "tr" nodes, and then to iterate/parse them....
1
by: bruce | last post by:
Hi Paul... Thanks for the reply. Came to the same conclusion a few minutes before I saw your email. Another question: tr=d.xpath(foo) gets me an array of nodes.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.