






import math



def 					_lowerCamelCase(			):





				'''simple docstring'''







				SCREAMING_SNAKE_CASE_   :	Optional[Any]													=   input('Enter message: '      )
				SCREAMING_SNAKE_CASE_   :	Dict													=   int(input(F'''Enter key [2-{len(lowerCAmelCase__      ) - 1}]: '''      )      )
				SCREAMING_SNAKE_CASE_   :	List[str]													=   input('Encryption/Decryption [e/d]: '      )

				if mode.lower().startswith('e'      ):
								SCREAMING_SNAKE_CASE_   :	int													=   encrypt_message(lowerCAmelCase__    ,    lowerCAmelCase__      )
				elif mode.lower().startswith('d'      ):
								SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   decrypt_message(lowerCAmelCase__    ,    lowerCAmelCase__      )

				# Append pipe symbol (vertical bar) to identify spaces at the end.
				print(F'''Output:\n{text + '|'}'''      )



def 					_lowerCamelCase(			lowerCAmelCase__				:		int    ,    lowerCAmelCase__				:		str      ):





				'''simple docstring'''







				SCREAMING_SNAKE_CASE_   :	Optional[Any]													=   [''] * key
				for col in range(lowerCAmelCase__      ):
								SCREAMING_SNAKE_CASE_   :	Optional[int]													=   col
								while pointer < len(lowerCAmelCase__      ):
												cipher_text[col] += message[pointer]
												pointer += key
				return "".join(lowerCAmelCase__      )



def 					_lowerCamelCase(			lowerCAmelCase__				:		int    ,    lowerCAmelCase__				:		str      ):





				'''simple docstring'''







				SCREAMING_SNAKE_CASE_   :	Optional[int]													=   math.ceil(len(lowerCAmelCase__      ) / key      )
				SCREAMING_SNAKE_CASE_   :	List[str]													=   key
				SCREAMING_SNAKE_CASE_   :	Optional[int]													=   (num_cols * num_rows) - len(lowerCAmelCase__      )
				SCREAMING_SNAKE_CASE_   :	List[str]													=   [''] * num_cols
				SCREAMING_SNAKE_CASE_   :	Any													=   0
				SCREAMING_SNAKE_CASE_   :	List[Any]													=   0

				for symbol in message:
								plain_text[col] += symbol
								col += 1

								if (
								    (col == num_cols)
								    or (col == num_cols - 1)
								    and (row >= num_rows - num_shaded_boxes)
								):
												SCREAMING_SNAKE_CASE_   :	str													=   0
												row += 1

				return "".join(lowerCAmelCase__      )


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				main()







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}.""")