From 2f0518a7f05fe878b552d7b3ec7056e3ab4a9a0a Mon Sep 17 00:00:00 2001 From: Robert Gerus Date: Tue, 11 Aug 2015 23:26:32 +0200 Subject: [PATCH] Modify the xpath --- plugins/commands/bonjour.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/commands/bonjour.rb b/plugins/commands/bonjour.rb index ac15e8f..f242c57 100644 --- a/plugins/commands/bonjour.rb +++ b/plugins/commands/bonjour.rb @@ -3,5 +3,5 @@ require 'nokogiri' Client.register_command("bonjour") { |args| link = Config.lookup("commands::bonjour::url") + String(rand(1..2370)) - Config.lookup("commands::bonjour::message") + Nokogiri::HTML(Net::HTTP.get(URI(link))).xpath('//div[@class="photo post"]/img/@src').inner_text + Config.lookup("commands::bonjour::message") + Nokogiri::HTML(Net::HTTP.get(URI(link))).xpath('//div[@class="photo post"]//img/@src').inner_text }