Skip to content

Commit

Permalink
dumbrunningsonic changed their HTML... fix !sonic
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Mill committed Jan 13, 2014
1 parent 512c101 commit b4d8029
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/sonic.rb
Expand Up @@ -10,7 +10,7 @@ def self.help
def self.on_message(message, matches)
page = rand(29)
doc = Hpricot(open("http://dumbrunningsonic.tumblr.com/page/#{page}").read)
imgs = doc.search("div[@class=post-content] img").map {|x| x.attributes['src']}
imgs = doc.search("div[@class=contentwrap] img").map {|x| x.attributes['src']}
imgs[rand(imgs.length)]
end

Expand Down

0 comments on commit b4d8029

Please sign in to comment.