tweak connection pooling for news

workspace
Brendan Howell 5 years ago
parent 12c561fc52
commit a6117d7d30

@ -331,6 +331,8 @@ class Publications(Bureau):
if entry.img != " ": if entry.img != " ":
fileext = "." + entry.img.rsplit(".",1)[1] fileext = "." + entry.img.rsplit(".",1)[1]
if len(fileext) > 4:
fileext = ".jpg"
filename = tempfile.mktemp(fileext) filename = tempfile.mktemp(fileext)
print("fetching", entry.img, filename) print("fetching", entry.img, filename)
urllib.request.urlretrieve(entry.img, filename) urllib.request.urlretrieve(entry.img, filename)

Loading…
Cancel
Save