rely on preview urls if available for gallery

This commit is contained in:
Albert Yi
2018-09-11 14:57:18 -07:00
parent e0e85a3139
commit 4972c998f8
8 changed files with 42 additions and 2 deletions

View File

@@ -50,6 +50,12 @@ module Sources
[url]
end
def preview_urls
image_urls.map do |x|
x.sub(%r!pximg\.net/img-original/img!, "pximg.net/c/240x240/img-master/img")
end
end
def page_url
if novel_id.present?
return "https://www.pixiv.net/novel/show.php?id=#{novel_id}&mode=cover"