Add an sjp plugin.

master
Robert Gerus 2014-03-25 07:44:14 +01:00
parent a50115b67f
commit 694de5fdb7
1 changed files with 7 additions and 0 deletions

7
plugins/commands/sjp.rb Normal file
View File

@ -0,0 +1,7 @@
require 'net/http'
require 'nokogiri'
Client.register_command("sjp") { |args|
doc = Nokogiri::HTML(Net::HTTP.get(URI(Config[:commands][:sjp][:url] + args[0])))
doc.xpath('//ul[@id="listahasel"]/li/div/div').inner_text
}