-2

我尝试制作一个程序来从显示 Flash 对象内的文本的主页中捕获数据。

它不适用于 InnerHTML,因为文本位于 flash 对象内。有没有办法做到这一点?帮助将不胜感激。

4

2 回答 2

0

There is no direct way of you accessing data from the flash file, what you are attempting to do is basically soft hacking / reverse engineering and usually if you have to ask such a question it's already out of your league.

Since this is pretty much a generalized question I'm going to give you exactly such answer:

  1. First the easy part, identifying the swf file and any other data that is automatically downloaded to your computer, this is done using various programs or browser addons.

  2. If you're lucky the text might be located outside of the compiled flash usually in a form of a xml file. If that's how it is then you're pretty much done, just a matter of reading the data.

  3. If that is not the case then you will have to resort to getting a swf decompiler, some are free, good ones are not, besides that you will also need a Hex editor.

Nedless to say, nothing of this has anything to do with Delphi because that's just way out of scope of this question.

于 2013-04-30T21:03:51.323 回答
0

You are missing several details from your attempted solution. However, one can assume that you are using an embedded web browser, and you are trying to use its methods to scrap content from a web page.

The thing is, a web page is not a single thing, but several objects that are retrieved by the web browser. The innerHTML property is, as you already know, just the text that tells the web browser to download some other content.

So, your actual question should be: how can I extract text from a Flash object?

The fact is, this is not easy nor reliable. But if you insist, start looking at a library like Delphi SWF SDK which can read and produce Flash files. This is a commercial library, thought.

于 2013-04-30T19:45:56.110 回答