make_supportedsites.py 485 B

1234567891011121314151617181920
  1. #!/usr/bin/env python3
  2. # Allow direct execution
  3. import os
  4. import sys
  5. sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
  6. from devscripts.utils import get_filename_args, write_file
  7. from yt_dlp.extractor import list_extractor_classes
  8. def main():
  9. out = '\n'.join(ie.description() for ie in list_extractor_classes() if ie.IE_DESC is not False)
  10. write_file(get_filename_args(), f'# Supported sites\n{out}\n')
  11. if __name__ == '__main__':
  12. main()