

from datetime import datetime

import requests
from bsa import BeautifulSoup

if __name__ == "__main__":
	A_	:			Optional[int]  	=      input('Enter image url: ').strip()
	print(f'''Downloading image from {url} ...''')
	A_	:			Optional[Any]  	=      BeautifulSoup(requests.get(url).content, 'html.parser')
	# The image URL is in the content field of the first meta tag with property og:image
	A_	:			Optional[Any]  	=      soup.find('meta', {'property': 'og:image'})['content']
	A_	:			int  	=      requests.get(image_url).content
	A_	:			Dict  	=      f'''{datetime.now():%Y-%m-%d_%H:%M:%S}.jpg'''
	with open(file_name, 'wb') as fp:
		fp.write(image_data)
	print(f'''Done. Image saved to disk as {file_name}.''')






from typing import Any

def 						UpperCamelCase (lowercase_:			list )					->				list[Any]:
	if not input_list:
		return []
	A__							:   Any					       =		[input_list.count(lowercase_ ) for value in input_list]
	A__							:   List[Any]					       =		max(lowercase_ )  # Gets the maximum count in the input list.
	# Gets values of modes
	return sorted({input_list[i] for i, value in enumerate(lowercase_ ) if value == y} )


if __name__ == "__main__":
	import doctest

	doctest.testmod()



