[tumblr] use s3.amazonaws.com for image URLs (#64)

This commit is contained in:
Mike Fährmann 2018-01-09 15:13:00 +01:00
parent 9a8e98f699
commit 75b2e84b6d
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -19,8 +19,8 @@ def _original_image(url):
return url
return re.sub(
(r"https?://\d+\.media\.tumblr\.com"
r"/([0-9a-f]+)/tumblr_([^/?&#.]+)_\d+\.([0-9a-z]+)"),
r"http://data.tumblr.com/\1/tumblr_\2_raw.\3", url
r"/([0-9a-f]+/tumblr_[^/?&#.]+)_\d+\.([0-9a-z]+)"),
r"https://s3.amazonaws.com/data.tumblr.com/\1_raw.\2", url
)