


"""simple docstring"""







def        UpperCAmelCase__	(lowerCAmelCase_       ):




					'''simple docstring'''


					__SCREAMING_SNAKE_CASE						       =    abs(lowerCAmelCase_       )
					__SCREAMING_SNAKE_CASE						       =    0
					while n > 0:
										res += n % 10
										n //= 10
					return res




def        UpperCAmelCase__	(lowerCAmelCase_       ):




					'''simple docstring'''


					__SCREAMING_SNAKE_CASE						       =    abs(lowerCAmelCase_       )
					return n if n < 10 else n % 10 + sum_of_digits(n // 10       )




def        UpperCAmelCase__	(lowerCAmelCase_       ):




					'''simple docstring'''


					return sum(int(lowerCAmelCase_       ) for c in str(abs(lowerCAmelCase_       )       )       )




def        UpperCAmelCase__	():




					'''simple docstring'''


					from collections.abc import Callable
					from timeit import timeit

					def benchmark_a_function(lowerCAmelCase_  ,						lowerCAmelCase_       ) -> None:
										__SCREAMING_SNAKE_CASE						       =    f"""{func.__name__}({value})"""
										__SCREAMING_SNAKE_CASE						       =    timeit(f"""__main__.{call}"""  ,						setup="import __main__"       )
										print(f"""{call:56} = {func(lowerCAmelCase_       )} -- {timing:.4f} seconds"""       )

					for value in (26_2144, 1125_8999_0684_2624, 126_7650_6002_2822_9401_4967_0320_5376):
										for func in (sum_of_digits, sum_of_digits_recursion, sum_of_digits_compact):
															benchmark_a_function(lowerCAmelCase_  ,						lowerCAmelCase_       )
										print()


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		benchmark()




"""simple docstring"""







from datetime import datetime

import requests




def        UpperCAmelCase__	(lowerCAmelCase_       ):




					'''simple docstring'''


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


if __name__ == "__main__":
		a__    :							str            =					input('''Enter Video/IGTV url: ''').strip()
		a__    :							List[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}.")
