From ee4222987dbc94650d822a6096e82a8266e14a9d Mon Sep 17 00:00:00 2001 From: Ryan Hammett Date: Sun, 17 Jan 2016 23:47:55 -0500 Subject: [PATCH] Testing iOS URL code --- slack-pixiv/commands/pixiv.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/slack-pixiv/commands/pixiv.rb b/slack-pixiv/commands/pixiv.rb index 3c4c617..0790154 100644 --- a/slack-pixiv/commands/pixiv.rb +++ b/slack-pixiv/commands/pixiv.rb @@ -11,6 +11,10 @@ module SlackMathbot pixiv_url = "http://www.pixiv.net" + _match[:url][0..-2] puts pixiv_url + # Create iOS URL + ios_url = "pixiv://illusts" + pixiv_url.split('=')[-1] + puts ios_url + # Scrape page title title = Mechanize.new.get(pixiv_url).title puts title @@ -25,6 +29,7 @@ module SlackMathbot attachments: [ { fallback: title + " - " + pixiv_url, + text: "<" + ios_url + "/|iOSTest" title: title, title_link: pixiv_url, image_url: image_url,