






from datetime import datetime

import requests





def 					lowercase_ (    __snake_case     :							str      )     -> bytes:





				'''simple docstring'''


				snake_case__      :int         =   "https://downloadgram.net/wp-json/wppress/video-downloader/video?url="
				snake_case__      :List[Any]         =   requests.get(base_url + url      ).json()[0]["urls"][0]["src"]
				return requests.get(__snake_case      ).content


if __name__ == "__main__":
	__UpperCAmelCase							:   Optional[Any]							=  input("Enter Video/IGTV url: ").strip()
	__UpperCAmelCase							:   Union[str, Any]							=  F'''{datetime.now():%Y-%m-%d_%H:%M:%S}.mp4'''
	with open(file_name, "wb") as fp:
		fp.write(download_video(url))
	print(F'''Done. Video saved to disk as {file_name}.''')







def 					lowercase_ (    __snake_case     :							list      )     -> list:





				'''simple docstring'''


				if any(not isinstance(__snake_case	,	__snake_case      ) or x < 0 for x in sequence      ):
								raise TypeError("Sequence must be list of non-negative integers"      )
				for _ in range(len(__snake_case      )      ):
								for i, (rod_upper, rod_lower) in enumerate(zip(__snake_case	,	sequence[1:]      )      ):
												if rod_upper > rod_lower:
																sequence[i] -= rod_upper - rod_lower
																sequence[i + 1] += rod_upper - rod_lower
				return sequence


if __name__ == "__main__":
	assert bead_sort([5, 4, 3, 2, 1]) == [1, 2, 3, 4, 5]
	assert bead_sort([7, 9, 4, 3, 5]) == [3, 4, 5, 7, 9]