MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / save_image

Function save_image

web_programming/random_anime_character.py:20–26  ·  view source on GitHub ↗

Saves the image of anime character

(image_url: str, image_title: str)

Source from the content-addressed store, hash-verified

18
19
20def save_image(image_url: str, image_title: str) -> None:
21 """
22 Saves the image of anime character
23 """
24 image = httpx.get(image_url, headers=headers, timeout=10)
25 with open(image_title, "wb") as file:
26 file.write(image.content)
27
28
29def random_anime_character() -> tuple[str, str, str]:

Callers 1

random_anime_characterFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected