From e536e926dd9e93510498b9e4336275be5f9f6059 Mon Sep 17 00:00:00 2001 From: Ryan Hammett Date: Sat, 23 Jan 2016 19:22:10 -0500 Subject: [PATCH] Testing the Member iOS Link --- slack-pixiv/commands/pixiv.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/slack-pixiv/commands/pixiv.rb b/slack-pixiv/commands/pixiv.rb index 813eec3..19ea8a2 100644 --- a/slack-pixiv/commands/pixiv.rb +++ b/slack-pixiv/commands/pixiv.rb @@ -11,10 +11,14 @@ module SlackMathbot pixiv_url = "http://www.pixiv.net" + _match[:url][0..-2] puts pixiv_url - # Create iOS URL + # Create iOS Illustration URL ios_url = "pixiv://illusts/" + pixiv_url.split('=')[-1] puts ios_url + # Create iOS Member URL + ios_mem_url = "pixiv://member/" + pixiv_url.split('=')[0..-1] + puts ios_mem_url + # Scrape page title title = Mechanize.new.get(pixiv_url).title puts title @@ -29,7 +33,7 @@ module SlackMathbot attachments: [ { fallback: title + " - " + pixiv_url, - text: "<" + ios_url + "|Open in App>", + text: "<" + ios_url + "|Open Illustration in App > <" + ios_mem_url + "|Open Member in App>", title: title, title_link: pixiv_url, image_url: image_url,