mirror of
https://github.com/hibobmaster/matrix_chatgpt_bot.git
synced 2024-10-01 05:35:36 -04:00
Remove image size limit
This commit is contained in:
parent
6f1420f484
commit
32ea08507d
@ -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:
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user