diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-10-23 19:59:52 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-10-23 21:20:19 +0530 |
commit | 96565c7e55bc3d97a1d4232fe974091dd45f5fe9 (patch) | |
tree | 5b6de2b3e755e09848bf3169384bd5854a59f1b7 /yt_dlp/__init__.py | |
parent | ec11a9f4a26e8225b195e5f91bd0b72b008d0c3a (diff) | |
download | hypervideo-pre-96565c7e55bc3d97a1d4232fe974091dd45f5fe9.tar.lz hypervideo-pre-96565c7e55bc3d97a1d4232fe974091dd45f5fe9.tar.xz hypervideo-pre-96565c7e55bc3d97a1d4232fe974091dd45f5fe9.zip |
[cleanup] Add keyword automatically to SearchIE descriptions
and some minor cleanup of docs
Diffstat (limited to 'yt_dlp/__init__.py')
-rw-r--r-- | yt_dlp/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py index e1c45441a..5c3d33df0 100644 --- a/yt_dlp/__init__.py +++ b/yt_dlp/__init__.py @@ -122,10 +122,10 @@ def _real_main(argv=None): desc = getattr(ie, 'IE_DESC', ie.IE_NAME) if desc is False: continue - if hasattr(ie, 'SEARCH_KEY'): + if getattr(ie, 'SEARCH_KEY', None) is not None: _SEARCHES = ('cute kittens', 'slithering pythons', 'falling cat', 'angry poodle', 'purple fish', 'running tortoise', 'sleeping bunny', 'burping cow') _COUNTS = ('', '5', '10', 'all') - desc += ' (Example: "%s%s:%s" )' % (ie.SEARCH_KEY, random.choice(_COUNTS), random.choice(_SEARCHES)) + desc += f'; "{ie.SEARCH_KEY}:" prefix (Example: "{ie.SEARCH_KEY}{random.choice(_COUNTS)}:{random.choice(_SEARCHES)}")' write_string(desc + '\n', out=sys.stdout) sys.exit(0) if opts.ap_list_mso: |