Merge branch 'scraper' into scraper-dev
This commit is contained in:
@ -65,7 +65,7 @@ class Post:
|
||||
except Exception as ex:
|
||||
exception = ex
|
||||
if self._image_data is None:
|
||||
raise ex
|
||||
raise exception
|
||||
return self._image_data
|
||||
|
||||
|
||||
|
||||
@ -124,8 +124,9 @@ def get_image(post_id: int = None):
|
||||
return send_file(path)
|
||||
else:
|
||||
post = py34.Post(entry.post, entry.dir, entry.image, entry.tags, entry.thumbnail)
|
||||
image = post.get_image_data()
|
||||
with open(path, "wb") as file:
|
||||
file.write(post.get_image_data())
|
||||
file.write(image)
|
||||
return send_file(path)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user