Remove image size limit

This commit is contained in:
hibobmaster 2023-03-28 20:40:33 +08:00
parent 6f1420f484
commit 32ea08507d
No known key found for this signature in database

View File

@ -75,8 +75,10 @@ class ImageGen:
# Use regex to search for src=""
image_links = regex.findall(r'src="([^"]+)"', response.text)
# Remove size limit
normal_image_links = [link.split("?w=")[0] for link in image_links]
# Remove duplicates
return list(set(image_links))
return list(set(normal_image_links))
def save_images(self, links: list, output_dir: str) -> str:
"""