From: Matthias Hecker Date: Mon, 13 Apr 2020 18:55:55 +0000 (+0200) Subject: plugin(oxford): fix empty service result see #37 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=2a084cf5175d62258488af0fdf45847e656ea7ad;hp=cc241a9709593491b6a67810ed8a5a5054e19208;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git plugin(oxford): fix empty service result see #37 --- 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="([^"]+)">([^<]+)