From 2a084cf5175d62258488af0fdf45847e656ea7ad Mon Sep 17 00:00:00 2001 From: Matthias Hecker Date: Mon, 13 Apr 2020 20:55:55 +0200 Subject: plugin(oxford): fix empty service result see #37 --- data/rbot/plugins/oxford.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/rbot/plugins/oxford.rb b/data/rbot/plugins/oxford.rb index 5c9b0e4e..eba1b938 100644 --- a/data/rbot/plugins/oxford.rb +++ b/data/rbot/plugins/oxford.rb @@ -51,8 +51,10 @@ class OxfordPlugin < Plugin url = "#{@base_url}/search/dataset.js?dataset=noad&dictionary=en&query=#{CGI.escape word}" response = @bot.httputil.get(url, headers: {'X-Requested-With': 'XMLHttpRequest'}) alternative = response.gsub(/\\/, '').scan(/href="([^"]+)">([^<]+)