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

@@ -36,6 +36,12 @@ module Sources::Strategies
.uniq
end
def preview_urls
image_urls.map do |x|
x.sub(%r!_1280\.(jpg|png|gif|jpeg)\z!, '_250.\1')
end
end
def page_url
[url, referer_url].each do |x|
if x =~ POST