



'''simple docstring'''






from datetime import datetime

import requests
def       lowerCamelCase__       (						_A				):
  a						:					Tuple        =     """https://downloadgram.net/wp-json/wppress/video-downloader/video?url="""
  a						:					List[Any]        =     requests.get(base_url + url				).json()[0]["""urls"""][0]["""src"""]
  return requests.get(__lowerCamelCase				).content


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







from functools import lru_cache






@lru_cache
def 				lowerCamelCase__      (    __lowerCamelCase			:     int		):
  if num < 0:
    raise ValueError("""Number should not be negative."""		)

  return 1 if num in (0, 1) else num * factorial(num - 1		)


if __name__ == "__main__":
       import doctest

       doctest.testmod()


