This is my code:
# Extract the images
images = product_soup.find_all('div', class_='woocommerce-product-gallery__image')
for i, image in enumerate(images):
img_src = image.find('img')['src']
print(img_src)
# Download the image
img_r = r.get(img_src, stream=True)
# Save the image with the title and a number as the file name
with open(f'{title}_{i}.jpg', 'wb') as f:
for chunk in img_r:
f.write(chunk)
the problem is that some image are not downloading properly:

What is the reason that this is happening and how can I fix that? It looks like the image is a WEBP file but if I save it manually as jpg it save fine.
