Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这个有据可查的答案似乎不再有效。响应不包含/Rank_1:\d:(\d+)/模式。
/Rank_1:\d:(\d+)/
我正在用 ruby-1.8.7 尝试这个。有趣的是,如果我使用 ruby-1.9.2 执行此操作,我会使用相同的代码得到 403 Forbidden 错误。
您可以使用PageRankr gem。
使用示例:
require 'page_rankr' PageRankr.ranks('http://google.com', :google)
返回哈希
{:google=>9}