diff --git a/screenless/bureau/publicrelations/publicrelations.py b/screenless/bureau/publicrelations/publicrelations.py index e4d7a9c..21d09f8 100644 --- a/screenless/bureau/publicrelations/publicrelations.py +++ b/screenless/bureau/publicrelations/publicrelations.py @@ -299,11 +299,11 @@ class PublicRelations(Bureau): if media.type == "image": img = media if img: - filename = img.url.rsplit('/',1)[1] - filename = "/tmp/" + filename - print("fetching", img.remote_url, filename) + #filename = img.url.rsplit('/',1)[1] + #filename = "/tmp/" + filename + #print("fetching", img.remote_url, filename) req_data = requests.get(img.url) - im = PIL.Image.open(io.StringIO(filename)) + im = PIL.Image.open(io.StringIO(req_data.content)) if im.mode in ("L", "RGB", "P"): im = PIL.ImageOps.equalize(im) im.thumbnail((576, 576), PIL.Image.ANTIALIAS)