1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-12 05:18:30 +00:00

[ie/generic] Simplify invalid URL error message (#14167)

Authored by: seproDev
This commit is contained in:
sepro 2025-08-27 23:27:57 +02:00 committed by GitHub
parent fec30c56f0
commit 1ddbd033f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -786,9 +786,7 @@ def _real_extract(self, url):
return self.url_result('ytsearch:' + url)
if default_search in ('error', 'fixup_error'):
raise ExtractorError(
f'{url!r} is not a valid URL. '
f'Set --default-search "ytsearch" (or run yt-dlp "ytsearch:{url}" ) to search YouTube', expected=True)
raise ExtractorError(f'{url!r} is not a valid URL', expected=True)
else:
if ':' not in default_search:
default_search += ':'