HtmlUnit iframe 与 javascript src
我正在尝试抓取 Google 关键字工具,但遇到了带有 javascript src 的 iframe 的问题。我以为 HtmlUnit 会自动处理这个问题,但是没有。我在谷歌上搜索并找到一些使用 page.asXml()
的建议,这应该可以解决这个问题,但它对我不起作用。
有没有办法完成这样的任务,或者 HtmlUnit 是不可能的?
这是此类 iframe 的示例:
<iframe src="javascript:''" id="__gwt_historyFrame" tabindex="-1" style="position:absolute;width:0;height:0;border:0"></iframe>
提前致谢
I am trying to scrape Google Keyword Tool and I run into the problem with iframes with javascript src. I thought that HtmlUnit will automaticaly handle this, but no. I was googling around and find some recomendation to use page.asXml()
which should solve this problem, but it does not work for me.
Is there even any way how to accomplish such task, or is it impossible with HtmlUnit?
Here is example of such iframe:
<iframe src="javascript:''" id="__gwt_historyFrame" tabindex="-1" style="position:absolute;width:0;height:0;border:0"></iframe>
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Google 关键字工具使用了大量 AJAX,这可能是问题所在。我能够通过 webkit 与 GWT 进行交互。
The Google Keyword Tool uses a lot of AJAX, which might be the problem. I was able to interact with GWT via webkit.