]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
search: fix gcalc regexp again
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Fri, 20 Mar 2009 22:29:25 +0000 (23:29 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Fri, 20 Mar 2009 22:29:25 +0000 (23:29 +0100)
data/rbot/plugins/search.rb

index 542f7cba2ec2306494eb1a24725b32dfcd9f8611..a485b0dfc3052be32ee9c16273c667aae32666a4 100644 (file)
@@ -18,7 +18,7 @@
 GOOGLE_SEARCH = "http://www.google.com/search?oe=UTF-8&q="
 GOOGLE_WAP_SEARCH = "http://www.google.com/wml/search?hl=en&q="
 GOOGLE_WAP_LINK = /<a accesskey="(\d)" href=".*?u=(.*?)">(.*?)<\/a>/im
-GOOGLE_CALC_RESULT = %r{<img src=/images/calc_img\.gif(?: width=40 height=30 alt="")?></td><td>&nbsp;</td><td nowrap(?: dir=ltr)?>(?:<h2 class=r>)?<font size=\+1><b>(.+)</b>(?:</h2>)?</td>}
+GOOGLE_CALC_RESULT = %r{<img src=/images/calc_img\.gif(?: width=40 height=30 alt="")?>.*?<h2 class=r[^>]*><b>(.+?)</b>}
 GOOGLE_COUNT_RESULT = %r{<font size=-1>Results <b>1<\/b> - <b>10<\/b> of about <b>(.*)<\/b> for}
 GOOGLE_DEF_RESULT = %r{<p> (Web definitions for .*?)<br/>(.*?)<br/>(.*?)\s-\s+<a href}