CDRM-Keys/CDRM-Keys.py
2024-09-16 20:42:33 -04:00

22 lines
655 B
Python

# Import dependencies
import CDRM_Modules
import argparse
def setup_arg_parser():
parser = argparse.ArgumentParser(description="CDRM-Keys")
parser.add_argument('--pssh', action='store_true', help='Parse PSSH from MPD/HLS')
return parser
def main():
parser = setup_arg_parser()
args = parser.parse_args()
if args.pssh:
psshs = (CDRM_Modules.Get_PSSH.get_pssh(mpd_or_m3u8_url=input("MPD/HLS URL: ")))
print(f'\n{psshs[0] if len(psshs) == 1 else psshs}')
else:
CDRM_Modules.Startup_Checks.run_startup_checks(startup=True)
CDRM_Modules.Main_Menu.main_menu()
if __name__ == "__main__":
main()