__main__.py 367 B

123456789101112131415161718
  1. #!/usr/bin/env python3
  2. # Execute with
  3. # $ python3 -m yt_dlp
  4. import sys
  5. if __package__ is None and not getattr(sys, 'frozen', False):
  6. # direct call of __main__.py
  7. import os.path
  8. path = os.path.realpath(os.path.abspath(__file__))
  9. sys.path.insert(0, os.path.dirname(os.path.dirname(path)))
  10. import yt_dlp
  11. if __name__ == '__main__':
  12. yt_dlp.main()