



import os

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

UpperCAmelCase								=   {"""UserAgent""": UserAgent().random}
UpperCAmelCase								=   """https://www.mywaifulist.moe/random"""

def      A_ (		__a       :			str	,						__a       :			str						):

				"""simple docstring"""
				a__			 =						requests.get(__a	,						headers=__a						)
				with open(__a	,						"""wb"""						) as file:
								file.write(image.content						)

def      A_ (		):

				"""simple docstring"""
				a__			 =						BeautifulSoup(requests.get(__a	,						headers=__a						).text	,						"""html.parser"""						)
				a__			 =						soup.find("""meta"""	,						attrs={"""property""": """og:title"""}						).attrs["""content"""]
				a__			 =						soup.find("""meta"""	,						attrs={"""property""": """og:image"""}						).attrs["""content"""]
				a__			 =						soup.find("""p"""	,						id="""description"""						).get_text()
				a__ ,     a__			 =						os.path.splitext(os.path.basename(__a						)						)
				a__			 =						title.strip().replace(""" """	,						"""_"""						)
				a__			 =						F'''{image_title}{image_extension}'''
				save_image(__a	,						__a						)
				return (title, description, image_title)


if __name__ == "__main__":
	UpperCAmelCase	,    UpperCAmelCase	,    UpperCAmelCase								=   random_anime_character()
	print(f"""{title}\n\n{desc}\n\nImage saved : {image_title}""")






def      A_ (		__a       :			int = 1_000						):

				"""simple docstring"""
				return sum(i for i in range(__a						) if i % 3 == 0 or i % 5 == 0						)


if __name__ == "__main__":
	print(f"""{solution() = }""")

