开发者

Navigate and scrape content from flash web app

I need a tool that I can point to a flash based website, navigate it, and check the content on given pages.

I don't think I can do it with just selenium a开发者_开发知识库s I can't target the elements in the flash app via xpaths.

Does anybody else have any ideas?


With regards to TimScollick's answer, seldom is content located inside of a SWF file. SWF files are usually full of ActionScript. You wouldn't expect to find a list of phone numbers inside a JavaScript file.

Firebug might work to identify the specific content you're after but proxying the site using something like Charles Proxy or screen-scraper's built-in proxy might work better.

As far as navigating the site goes, you may need to set up your scraper such that it makes specific requests in order to obtain certain values that you then need to use in subsequent requests. Again, proxying the site will not only potentially reveal the content you're after but will also show you what data is needed in order to make proper requests and what data should be included in those requests.

Working with SWF files may feel like a blackbox but you could try decompiling the different SWF files using showmycode.com or Elitma's Trillix Flash Decompiler. Keep in mind that ActionScript is mostly just JavaScript. If needed, it may be possible to drop existing AS into a JavaScript parser in order to replicate the behavior occurring inside one of the SWF files. screen-scraper has that ability built-in.

Should you be dealing with a site where the interaction between the client (Flash movie) and the server is facilitated by way of AMF then Charles is an excellent choice since it has a built-in AMF deserializer (a rare thing).


There are two ways to go about this. If the data that you're looking for is located inside the swf, you will have to download the swf and extract the data using a decompiler.

If the data is external, you can use Firebug to see the calls and try to reverse engineer them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜