






from __future__ import annotations



def 					_lowerCamelCase(			lowerCAmelCase__				:		List[str]    ,    lowerCAmelCase__				:		Optional[int]    ,    lowerCAmelCase__				:		Dict    ,    lowerCAmelCase__				:		Tuple      ):  # noqa: E741





				'''simple docstring'''







				while r - l > 1:
								SCREAMING_SNAKE_CASE_   :	Dict													=   (l + r) // 2
								if v[m] >= key:
												SCREAMING_SNAKE_CASE_   :	Dict													=   m
								else:
												SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   m  # noqa: E741
				return r



def 					_lowerCamelCase(			lowerCAmelCase__				:		list[int]      ):





				'''simple docstring'''







				if len(lowerCAmelCase__      ) == 0:
								return 0

				SCREAMING_SNAKE_CASE_   :	int													=   [0] * len(lowerCAmelCase__      )
				SCREAMING_SNAKE_CASE_   :	List[Any]													=   1

				SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   v[0]

				for i in range(1    ,    len(lowerCAmelCase__      )      ):
								if v[i] < tail[0]:
												SCREAMING_SNAKE_CASE_   :	int													=   v[i]
								elif v[i] > tail[length - 1]:
												SCREAMING_SNAKE_CASE_   :	Optional[int]													=   v[i]
												length += 1
								else:
												SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   v[i]

				return length


if __name__ == "__main__":
				import doctest

				doctest.testmod()







from datetime import datetime

import requests
from bsa import BeautifulSoup

if __name__ == "__main__":
				A        =			input('Enter image url: ').strip()
				print(f"""Downloading image from {url} ...""")
				A        =			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        =			soup.find('meta', {'property': 'og:image'})['content']
				A        =			requests.get(image_url).content
				A        =			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}.""")