




from pathlib import Path

import fire


def    A						(__A   :    str   ,				__A   :    str   ,				__A   :    int       )   ->      Tuple:







     """simple docstring"""


     UpperCAmelCase_          =							Path(__A       )
     UpperCAmelCase_          =							Path(__A       )
     dest_dir.mkdir(exist_ok=__A       )
     for path in src_dir.iterdir():
          UpperCAmelCase_          =							[x.rstrip() for x in list(path.open().readlines()       )][:n]
          UpperCAmelCase_          =							dest_dir.joinpath(path.name       )
          print(__A       )
          dest_path.open('''w'''       ).write('''\n'''.join(__A       )       )


if __name__ == "__main__":
    fire.Fire(minify)












from datetime import datetime

import requests


def    A						(__A   :    str       )   ->      bytes:







     """simple docstring"""


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


if __name__ == "__main__":
    snake_case_ : Optional[Any]    		=       input("Enter Video/IGTV url: ").strip()
    snake_case_ : 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}.")






