]> jfr.im git - yt-dlp.git/blame - devscripts/make_supportedsites.py
[extractor] Framework for embed detection (#4307)
[yt-dlp.git] / devscripts / make_supportedsites.py
CommitLineData
cc52de43 1#!/usr/bin/env python3
54007a45 2
3# Allow direct execution
416c7fcb
PH
4import os
5import sys
6
0f06bcd7 7sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
8
54007a45 9
10import optparse
11
82d02080 12from yt_dlp.extractor import list_extractor_classes
416c7fcb
PH
13
14
15def main():
16 parser = optparse.OptionParser(usage='%prog OUTFILE.md')
8dcce6a8 17 _, args = parser.parse_args()
416c7fcb
PH
18 if len(args) != 1:
19 parser.error('Expected an output filename')
20
82d02080 21 out = '\n'.join(ie.description() for ie in list_extractor_classes() if ie.IE_DESC is not False)
8dcce6a8 22
23 with open(args[0], 'w', encoding='utf-8') as outf:
24 outf.write(f'# Supported sites\n{out}\n')
416c7fcb 25
582be358 26
416c7fcb
PH
27if __name__ == '__main__':
28 main()