From 004164d716ca9841422b8c1c085ee26e1c448dc0 Mon Sep 17 00:00:00 2001 From: Dan Muckerman Date: Thu, 26 Jul 2018 22:40:29 -0400 Subject: [PATCH] Update image code to try and properly catch 403 error --- slack-pixiv/commands/illust.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slack-pixiv/commands/illust.rb b/slack-pixiv/commands/illust.rb index e4bb17c..b047d6b 100644 --- a/slack-pixiv/commands/illust.rb +++ b/slack-pixiv/commands/illust.rb @@ -40,7 +40,7 @@ module SlackMathbot image_url = agent.get(pixiv_url).images_with(:src => /600x600\/img-master/)[0].to_s.sub! '600x600','480x960' begin # Attempt to check on image - page = agent.head(image_url) + page = agent.get(image_url) # Make sure page came back kosher if page.code.to_i == 200