ruby-on-rails - 使用 Jruby/Rails 实现 Google 的 hashbang/Ajax 爬网?

标签 ruby-on-rails seo jruby htmlunit watij

从这里开始工作:http://support.google.com/webmasters/bin/answer.py?hl=en&answer=174992

建议将页面的 html 快照用于索引。我怎样才能用 watij 做到这一点?用 htmlunit?

最佳答案

这是我想出的:

https://gist.github.com/3702913

基本上,我们使用 capybara 加载然后呈现页面。简单。

我首先尝试了 WebSpec 和 HtmlUnit,但运气不佳。 (话又说回来,JRuby 会使事情复杂化。)

关于ruby-on-rails - 使用 Jruby/Rails 实现 Google 的 hashbang/Ajax 爬网?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9246090/

相关文章:

ruby-on-rails - Ruby on Rails 页面的一个或两个 Controller 操作

ruby-on-rails - rails : Using form_for multiple times (DOM ids)

html - Bootstrap 下拉悬停不起作用

.htaccess - 重写链接,使链接地址更加 seo 友好

java - jruby注释方法没有被调用

ruby-on-rails - rspec Controller 测试,获取多个参数

seo - Robots.txt 排除模式

Angular 无法加载其他路线

JAVA_HOME 在 Windows 8 上未设置

mysql - 在 JRuby 上使用 ActiveRecord 对 MariaDB 的首次查询需要 5 分钟以上才能执行