How does Diablo 3 Rate in Beta?
IGN won’t rate it, but that doesn’t stop people from doing it on blizzard space. Anyways, hackers don’t read… We hack, no?
249 people rated, with an average rating of 7.67/10. Technically a win, but I’m not too sure if it meets Blizzard’s standards.
Run for yourself. Here’s my code:
#!/usr/bin/env ruby
require 'mechanize'
agent = Mechanize.new { |agent| agent.user_agent_alias = 'Mac Safari'}
url = "http://us.battle.net/d3/en/forum/topic/4511823163?page=1"
def rating_scrape(page)
page.search('.post-detail').collect do |post|
post.text[/(\d*|\d\.\d)\/10/]
end.compact
end
page = agent.get(url)
@rarray = []
until page.nil?
if page.link_with(:text => /next/i).nil?
page = nil
else
page = page.link_with(:text => /next/i).click
@rarray 10 ? n = 10 : n } #over 10 ratings are rounded down to 10/10.
p l = ratings.length #number of ratings
p ratings.inject(:+)/l #average