fix regex

This commit is contained in:
Toks
2014-07-16 21:10:54 -04:00
parent 364feba64a
commit 3cac0458df

View File

@@ -15,7 +15,7 @@ module Downloads
def rewrite_jpeg_versions(url, headers)
# example: https://yande.re/jpeg/2c6876ac2317fce617e3c5f1a642123b/yande.re%20292092%20hatsune_miku%20tid%20vocaloid.jpg
if url =~ %r{\A(https?://(?:#{DOMAINS}))/jpeg/([a-f0-9]+/.+)\.jpg\Z}
if url =~ %r{\A(https?://(?:#{DOMAINS}))/jpeg/([a-f0-9]+(?:/.*)?)\.jpg\Z}
url = $1 + "/image/" + $2 + ".png"
end