diff options
author | Matthias H <apoc@sixserv.org> | 2013-08-20 01:00:05 +0200 |
---|---|---|
committer | Matthias H <apoc@sixserv.org> | 2013-08-20 01:00:05 +0200 |
commit | 46481eb0434ddb09754f7d12fd41a94de6d63871 (patch) | |
tree | 8e2b7ead5b19a2061df5294ffad7e159c93b08a5 /data | |
parent | d041e613c9562523587ae92803b7792cf31cbc84 (diff) |
urban: urbandictionary.com changed markup, fixes regexp
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/urban.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/rbot/plugins/urban.rb b/data/rbot/plugins/urban.rb index d6688306..8186dbd7 100644 --- a/data/rbot/plugins/urban.rb +++ b/data/rbot/plugins/urban.rb @@ -26,7 +26,7 @@ class UrbanPlugin < Plugin else 1 end rv = Array.new - s.scan(%r{<td class='index'[^>]*>.*?(\d+)\..*?</td>.*?<td class='word'>(?:<a.*?>)?([^>]+)(?:</a>)?</td>.*?<div class="definition">(.+?)</div>.*?<div class="example">(.+?)</div>}m) do |num, wrd, desc, ex| + s.scan(%r{<td class='index'[^>]*>.*?(\d+)\..*?</td>.*?<td class='word'[^>]*>.*?<span>(.*?)</span>.*?<div class="definition">(.+?)</div>.*?<div class="example">(.+?)</div>}m) do |num, wrd, desc, ex| rv << [num.to_i, wrd.strip, desc.strip, ex.strip] end |