]>
Raphaƫl G. Git Repositories - youtubedl/blob - devscripts/gh-pages/update-sites.py
d3ef5f0b50daa56513118f55d5b636e5f46552a0
2 from __future__
import unicode_literals
8 # We must be able to import youtube_dl
9 sys
.path
.append(os
.path
.dirname(os
.path
.dirname(os
.path
.dirname(os
.path
.abspath(__file__
)))))
15 with open('supportedsites.html.in', 'r', encoding
='utf-8') as tmplf
:
16 template
= tmplf
.read()
19 for ie
in youtube_dl
.list_extractors(age_limit
=None):
20 ie_html
= '<b>{}</b>'.format(ie
.IE_NAME
)
21 ie_desc
= getattr(ie
, 'IE_DESC', None)
24 elif ie_desc
is not None:
25 ie_html
+= ': {}'.format(ie
.IE_DESC
)
27 ie_html
+= ' (Currently broken)'
28 ie_htmls
.append('<li>{}</li>'.format(ie_html
))
30 template
= template
.replace('@SITES@', textwrap
.indent('\n'.join(ie_htmls
), '\t'))
32 with open('supportedsites.html', 'w', encoding
='utf-8') as sitesf
:
33 sitesf
.write(template
)
35 if __name__
== '__main__':