从 Flash Web 应用程序中导航和抓取内容

发布于 2024-08-18 02:48:27 字数 136 浏览 1 评论 0原文

我需要一个工具,可以指向基于 Flash 的网站、对其进行导航并检查给定页面上的内容。

我认为仅使用 selenium 无法做到这一点,因为我无法通过 xpath 定位 Flash 应用程序中的元素。

还有其他人有什么想法吗?

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 as I can't target the elements in the flash app via xpaths.

Does anybody else have any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

枯叶蝶 2024-08-25 02:48:27

关于 TimScollick 的回答,SWF 文件中的内容很少。 SWF 文件通常充满 ActionScript。您不会期望在 JavaScript 文件中找到电话号码列表。

Firebug 可能会识别您想要的特定内容,但使用 Charles Proxy 或 screen-scraper 的内置代理等代理网站可能效果更好。

就导航网站而言,您可能需要设置抓取工具,以便它发出特定请求,以便获取您需要在后续请求中使用的某些值。同样,代理网站不仅可能会泄露您想要的内容,还会向您显示发出正确请求所需的数据以及这些请求中应包含哪些数据。

使用 SWF 文件可能感觉像黑匣子,但您可以尝试使用 showmycode.com 或 Elitma 的 Trillix Flash Decompiler 反编译不同的 SWF 文件。请记住,ActionScript 主要就是 JavaScript。如果需要,可以将现有 AS 放入 JavaScript 解析器中,以便复制 SWF 文件之一内发生的行为。 screen-scraper 内置了这种能力。

如果您正在处理一个通过 AMF 促进客户端(Flash 电影)和服务器之间交互的站点,那么 Charles 是一个很好的选择,因为它有一个内置的 AMF 反序列化器(很少见)。

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).

浅听莫相离 2024-08-25 02:48:27

有两种方法可以解决这个问题。如果您要查找的数据位于 swf 内部,则必须下载 swf 并使用反编译器提取数据。

如果数据是外部的,您可以使用 Firebug 查看调用并尝试对其进行逆向工程。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文