Remove image size limit

This commit is contained in:
hibobmaster 2023-03-28 20:40:33 +08:00
parent 6f1420f484
commit 32ea08507d
Signed by: bobmaster
SSH key fingerprint: SHA256:5ZYgd8fg+PcNZNy4SzcSKu5JtqZyBF8kUhY7/k2viDk

View file

@ -75,8 +75,10 @@ class ImageGen:
# Use regex to search for src="" # Use regex to search for src=""
image_links = regex.findall(r'src="([^"]+)"', response.text) 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 # Remove duplicates
return list(set(image_links)) return list(set(normal_image_links))
def save_images(self, links: list, output_dir: str) -> str: def save_images(self, links: list, output_dir: str) -> str:
""" """