2021-06-03 09:43:42 +00:00
|
|
|
#!/usr/bin/env python3
|
2022-06-24 11:06:16 +00:00
|
|
|
|
|
|
|
# Allow direct execution
|
2014-12-30 18:35:35 +00:00
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
2022-05-09 11:54:28 +00:00
|
|
|
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
|
|
|
2022-06-24 11:06:16 +00:00
|
|
|
|
|
|
|
import optparse
|
|
|
|
|
2022-05-11 15:54:44 +00:00
|
|
|
from yt_dlp.extractor import list_extractor_classes
|
2014-12-30 18:35:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
parser = optparse.OptionParser(usage='%prog OUTFILE.md')
|
2022-05-09 04:32:17 +00:00
|
|
|
_, args = parser.parse_args()
|
2014-12-30 18:35:35 +00:00
|
|
|
if len(args) != 1:
|
|
|
|
parser.error('Expected an output filename')
|
|
|
|
|
2022-05-11 15:54:44 +00:00
|
|
|
out = '\n'.join(ie.description() for ie in list_extractor_classes() if ie.IE_DESC is not False)
|
2022-05-09 04:32:17 +00:00
|
|
|
|
|
|
|
with open(args[0], 'w', encoding='utf-8') as outf:
|
|
|
|
outf.write(f'# Supported sites\n{out}\n')
|
2014-12-30 18:35:35 +00:00
|
|
|
|
2016-11-17 11:42:56 +00:00
|
|
|
|
2014-12-30 18:35:35 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|