#1866: Support HTTPS urls

This commit is contained in:
Toks
2014-05-15 23:35:57 -04:00
parent b3bab586d3
commit 5f70768962
4 changed files with 12 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ module Downloads
protected
def rewrite_html_pages(url, headers)
if url =~ %r{^http://.+?\.deviantart\.com/art/}
if url =~ %r{^https?://.+?\.deviantart\.com/art/}
source = ::Sources::Strategies::DeviantArt.new(url)
source.get
return [source.image_url, headers]
@@ -22,10 +22,10 @@ module Downloads
end
def rewrite_thumbnails(url, headers)
if url =~ %r{^(http://.+?\.deviantart\.net/.+?/)200H/}
if url =~ %r{^(https?://.+?\.deviantart\.net/.+?/)200H/}
match = $1
url.sub!(match + "200H/", match)
elsif url =~ %r{^(http://.+?\.deviantart\.net/.+?/)PRE/}
elsif url =~ %r{^(https?://.+?\.deviantart\.net/.+?/)PRE/}
match = $1
url.sub!(match + "PRE/", match)
end