Skip to content

Commit f3fea43

Browse files
committed
🐛 Minor fix for image command
1 parent 6d85262 commit f3fea43

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

killua/cogs/web_scraping.py

+3
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ async def get_bing_images(self, query: str) -> List[str]:
241241
except Exception:
242242
continue # Possible it errors, skip if so
243243

244+
# Filter out any malformed urls
245+
images = list(filter(lambda x: re.match(r"^https?://[^\s]+$", x), images))
246+
244247
return images
245248

246249
@check(4)

0 commit comments

Comments
 (0)