try to only use the remote url for images

workspace
Brendan Howell 7 years ago
parent 8c1b8f4217
commit 8fe7ba48ce

@ -300,7 +300,7 @@ class PublicRelations(Bureau):
if img: if img:
filename = img.url.rsplit('/',1)[1] filename = img.url.rsplit('/',1)[1]
filename = "/tmp/" + filename filename = "/tmp/" + filename
print("fetching", img.url, filename) print("fetching", img.remote_url, filename)
urllib.request.urlretrieve(img.url, filename) urllib.request.urlretrieve(img.url, filename)
im = PIL.Image.open(filename) im = PIL.Image.open(filename)
if im.mode in ("L", "RGB", "P"): if im.mode in ("L", "RGB", "P"):

Loading…
Cancel
Save