From a6117d7d302dd2781142a0444344ff4eab79e379 Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Sun, 7 Jun 2020 09:33:26 +0200 Subject: [PATCH] tweak connection pooling for news --- screenless/bureau/publications/publications.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/screenless/bureau/publications/publications.py b/screenless/bureau/publications/publications.py index a90ef43..e433ab5 100644 --- a/screenless/bureau/publications/publications.py +++ b/screenless/bureau/publications/publications.py @@ -331,6 +331,8 @@ class Publications(Bureau): if entry.img != " ": fileext = "." + entry.img.rsplit(".",1)[1] + if len(fileext) > 4: + fileext = ".jpg" filename = tempfile.mktemp(fileext) print("fetching", entry.img, filename) urllib.request.urlretrieve(entry.img, filename)