Kissmetrics 数据抓取
Kissmetrics 是一个非常酷的软件包,但不提供根据您在仪表板上创建的“指标”构建您自己的小部件的能力。我一直在做一些调查,看起来页面加载后,会发生一些 js 魔法,返回一些数据并写入指标小部件。
我试图通读 js 来找出数据是从哪里提取的或何时写入的,但视觉解析起来很痛苦。
有什么方法可以找出 js 通过 AJAX 提取数据的位置吗?我希望它出现在 Firebug 的“网络”或“控制台”选项卡中,但不幸的是它没有出现。
任何对此的帮助都会很棒!
Kissmetrics is a pretty cool package, but doesn't offer the ability to build your own widgets off their "metrics" that you create on your dashboard. I have been doing some investigation and it looks like after page load, some js wizardry happens that returns some data and the metrics widgets are written to.
I was trying to read through the js to find out where the data was being pulled from or when it was being written, but it was a pain to parse visually.
Is there any way to figure out where js is pulling data via AJAX for this? I would expect it to appear in the Net or Console tab in Firebug, but it doesn't unfortunately.
Any help with this would be awesome!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能已经继续前进,但我已经找到了一个基于此 博客文章。其中一些已经过时了,因为他们正在更新代码,但基础知识已经存在:
Kissmetrics 还实现了大部分 URL 生成代码JS,如果你知道去哪里看的话,它是非常可读的。我强烈建议您在提出一些请求时查看网络检查器,这样您就可以从那里进行逆向工程。除了该博客文章中的 PHP 脚本之外,我还为此构建了一个 ruby gem,希望很快就会推出。
You've probably moved on already, but I've found a working solution based on a solution outlined in this blog post. Some of it is already outdated, because they're updating their code, but the basics are there:
Kissmetrics also implements most of their URL-generation code in JS, which is very readable if you know where to look. I highly recommend looking at the network inspector while making some requests, and you'll be able to reverse-engineer from there. I've also built a ruby gem for this, in addition to the PHP script in that blog post, which will hopefully be available soon.