]>
jfr.im git - yt-dlp.git/blob - devscripts/gh-pages/update-sites.py
7 # We must be able to import youtube_dl
8 sys
.path
.append(os
.path
.dirname(os
.path
.dirname(os
.path
.dirname(os
.path
.abspath(__file__
)))))
14 with open('supportedsites.html.in', 'r', encoding
='utf-8') as tmplf
:
15 template
= tmplf
.read()
18 for ie
in sorted(youtube_dl
.gen_extractors(), key
=lambda i
: i
.IE_NAME
.lower()):
19 ie_html
= '<b>{}</b>'.format(ie
.IE_NAME
)
20 ie_desc
= getattr(ie
, 'IE_DESC', None)
23 elif ie_desc
is not None:
24 ie_html
+= ': {}'.format(ie
.IE_DESC
)
25 if ie
.working() == False:
26 ie_html
+= ' (Currently broken)'
27 ie_htmls
.append('<li>{}</li>'.format(ie_html
))
29 template
= template
.replace('@SITES@', textwrap
.indent('\n'.join(ie_htmls
), '\t'))
31 with open('supportedsites.html', 'w', encoding
='utf-8') as sitesf
:
32 sitesf
.write(template
)
34 if __name__
== '__main__':