From 32ea08507d3d1919dce2729a1e8aefd647ea32cc Mon Sep 17 00:00:00 2001 From: hibobmaster <32976627+hibobmaster@users.noreply.github.com> Date: Tue, 28 Mar 2023 20:40:33 +0800 Subject: [PATCH] Remove image size limit --- BingImageGen.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BingImageGen.py b/BingImageGen.py index 75fe7cd..65c83a0 100644 --- a/BingImageGen.py +++ b/BingImageGen.py @@ -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: """