|
|
@ -334,9 +334,13 @@ class Publications(Bureau):
|
|
|
|
if len(fileext) > 4:
|
|
|
|
if len(fileext) > 4:
|
|
|
|
fileext = ".jpg"
|
|
|
|
fileext = ".jpg"
|
|
|
|
filename = tempfile.mktemp(fileext)
|
|
|
|
filename = tempfile.mktemp(fileext)
|
|
|
|
print("fetching", entry.img, filename)
|
|
|
|
try:
|
|
|
|
urllib.request.urlretrieve(entry.img, filename)
|
|
|
|
print("fetching", entry.img, filename)
|
|
|
|
entry.img = "file://" + filename
|
|
|
|
urllib.request.urlretrieve(entry.img, filename)
|
|
|
|
|
|
|
|
entry.img = "file://" + filename
|
|
|
|
|
|
|
|
except urllib.error.HTTPError as err:
|
|
|
|
|
|
|
|
self.log.error(err)
|
|
|
|
|
|
|
|
entry.img = ""
|
|
|
|
|
|
|
|
|
|
|
|
return entry
|
|
|
|
return entry
|
|
|
|
|
|
|
|
|
|
|
|