mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-06-12 07:31:59 +02:00
[extractor] Use classmethod/property where possible
and refactor lazy extractors accordingly. This reduces the need to create extractor instances
This commit is contained in:
parent
7ddbf09c25
commit
82d020804d
11 changed files with 188 additions and 167 deletions
|
@ -5,7 +5,7 @@ import sys
|
|||
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from yt_dlp.extractor import list_extractors
|
||||
from yt_dlp.extractor import list_extractor_classes
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -14,7 +14,7 @@ def main():
|
|||
if len(args) != 1:
|
||||
parser.error('Expected an output filename')
|
||||
|
||||
out = '\n'.join(ie.description() for ie in list_extractors(None) if ie.IE_DESC is not False)
|
||||
out = '\n'.join(ie.description() for ie in list_extractor_classes() if ie.IE_DESC is not False)
|
||||
|
||||
with open(args[0], 'w', encoding='utf-8') as outf:
|
||||
outf.write(f'# Supported sites\n{out}\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue