diff --git a/app/logical/pixiv_web_agent.rb b/app/logical/pixiv_web_agent.rb index 1266ebec4..adccbd872 100644 --- a/app/logical/pixiv_web_agent.rb +++ b/app/logical/pixiv_web_agent.rb @@ -53,7 +53,7 @@ class PixivWebAgent if mech.current_page.body =~ /"error":false/ cookie = mech.cookies.select {|x| x.name == SESSION_COOKIE_KEY}.first if cookie - Cache.put(SESSION_CACHE_KEY, cookie.value, 1.month) + Cache.put(SESSION_CACHE_KEY, cookie.value, 1.week) end end @@ -61,7 +61,7 @@ class PixivWebAgent mech.get("https://comic.pixiv.net") do |page| cookie = mech.cookies.select {|x| x.name == COMIC_SESSION_COOKIE_KEY}.first if cookie - Cache.put(COMIC_SESSION_CACHE_KEY, cookie.value, 1.month) + Cache.put(COMIC_SESSION_CACHE_KEY, cookie.value, 1.week) end end rescue Net::HTTPServiceUnavailable diff --git a/app/logical/sources/strategies/pixiv.rb b/app/logical/sources/strategies/pixiv.rb index 1e484e14f..9cada87f0 100644 --- a/app/logical/sources/strategies/pixiv.rb +++ b/app/logical/sources/strategies/pixiv.rb @@ -95,7 +95,8 @@ module Sources is_manga = @page_count > 1 if !@zip_url - @image_url = image_urls.first + @image_url = get_image_url_from_page(page, @page_count > 1) + #@image_url = image_urls.first end end