deviantart: remove obsolete image sample rewrite rules.
Remove rewrite rules for these types of sample urls: * http://th00.deviantart.net/fs71/PRE/f/2014/065/3/b/goruto_by_xyelkiltrox-d797tit.png * http://th04.deviantart.net/fs70/300W/f/2009/364/4/d/Alphes_Mimic___Rika_by_Juriesute.png These URLs aren't served to users any more, and just stripping out "PRE" or "200H" isn't sufficient to get the full size image. In general, an api call is required to find the full size image url.
This commit is contained in:
@@ -18,17 +18,6 @@ module Sources
|
||||
end
|
||||
|
||||
def image_urls
|
||||
# normalize thumbnails
|
||||
if url =~ %r{^(https?://(?:fc|th)\d{2}\.deviantart\.net/.+?/)200H/}
|
||||
match = $1
|
||||
return [url.sub(match + "200H/", match)]
|
||||
end
|
||||
|
||||
if url =~ %r{^(https?://(?:fc|th)\d{2}\.deviantart\.net/.+?/)PRE/}
|
||||
match = $1
|
||||
return [url.sub(match + "PRE/", match)]
|
||||
end
|
||||
|
||||
# return direct links
|
||||
if url =~ ATTRIBUTED_ASSET || url =~ ASSET
|
||||
return [url]
|
||||
|
||||
Reference in New Issue
Block a user