]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
search plugin: fix gcalc regexp
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 30 Jun 2008 08:47:03 +0000 (10:47 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 30 Jun 2008 08:47:03 +0000 (10:47 +0200)
data/rbot/plugins/search.rb

index 28e3c8a3655c034f3e555644f65dff08b80ac1d1..b0decd518cfafd9cc931dc361401eb627deedd4f 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>(?:<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="")?></td><td>&nbsp;</td><td nowrap(?: dir=ltr)?>(?:<h2 class=r>)?<font size=\+1><b>(.+)</b>(?:</h2>)?</td>}
 GOOGLE_DEF_RESULT = %r{<p> (Web definitions for .*?)<br/>(.*?)<br/>(.*?)\s-\s+<a href}
 
 class SearchPlugin < Plugin