]>
Raphaƫl G. Git Repositories - youtubedl/blob - devscripts/make_supportedsites.py
2 from __future__
import unicode_literals
11 ROOT_DIR
= os
.path
.join(os
.path
.dirname(__file__
), '..')
12 sys
.path
.append(ROOT_DIR
)
17 parser
= optparse
.OptionParser(usage
='%prog OUTFILE.md')
18 options
, args
= parser
.parse_args()
20 parser
.error('Expected an output filename')
26 ie_md
= '**{0}**'.format(ie
.IE_NAME
)
27 ie_desc
= getattr(ie
, 'IE_DESC', None)
30 if ie_desc
is not None:
31 ie_md
+= ': {0}'.format(ie
.IE_DESC
)
33 ie_md
+= ' (Currently broken)'
36 ies
= sorted(youtube_dl
.gen_extractors(), key
=lambda i
: i
.IE_NAME
.lower())
37 out
= '# Supported sites\n' + ''.join(
39 for md
in gen_ies_md(ies
))
41 with io
.open(outfile
, 'w', encoding
='utf-8') as outf
:
44 if __name__
== '__main__':