forked from LiveCarta/BookConverter
Add sleep(3s) to send images
This commit is contained in:
@@ -33,7 +33,8 @@ def update_src_links_in_images(body_tag: Tag,
|
||||
href2img_content: dict,
|
||||
path_to_html,
|
||||
access=None,
|
||||
path2aws_path=None):
|
||||
path2aws_path=None,
|
||||
book_id=None):
|
||||
img_tags = body_tag.find_all('img')
|
||||
|
||||
for img in img_tags:
|
||||
@@ -51,11 +52,11 @@ def update_src_links_in_images(body_tag: Tag,
|
||||
new_folder = path2aws_path[path_to_img_from_root]
|
||||
else:
|
||||
new_folder = save_image_to_aws(
|
||||
access, path_to_img_from_root, img_content, 'book_id')
|
||||
access, path_to_img_from_root, img_content, book_id)
|
||||
path2aws_path[path_to_img_from_root] = new_folder
|
||||
else:
|
||||
new_folder = save_image_locally(
|
||||
path_to_img_from_root, img_content, 'book_id')
|
||||
path_to_img_from_root, img_content, book_id)
|
||||
|
||||
img.attrs['src'] = str(new_folder)
|
||||
if img.attrs.get('width'):
|
||||
|
||||
Reference in New Issue
Block a user