]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
azgame: catch scraping error
authorMatthias H <apoc@sixserv.org>
Sun, 18 Aug 2013 10:26:39 +0000 (12:26 +0200)
committerMatthias H <apoc@sixserv.org>
Sun, 18 Aug 2013 10:26:39 +0000 (12:26 +0200)
data/rbot/plugins/games/azgame.rb

index a19da43c49456623f0c0c95e0879d44bab96f854..91caf35d41fc227338f3a1527ba42ab8b1f63fd7 100644 (file)
@@ -560,6 +560,7 @@ class AzGamePlugin < Plugin
         debug "getting random word from dictionary, matching #{random}"
         p = @bot.httputil.get(rules[:url] % CGI.escape(random))
         debug p
+        raise 'unable to get search results' if not p.match /Search results for/i
         lemmi = Array.new
         good = rules[:good]
         # We look for a lemma composed by a single word and of length at least two