Skip to content

Commit 5f1b354

Browse files
updated error message
1 parent 306bc92 commit 5f1b354

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

yt_fts/search.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,11 @@ def fts_search(text, scope, channel_id=None, video_id=None, limit=None):
3333
res = search_video(video_id, text, limit)
3434

3535
if len(res) == 0:
36-
console.print("- Try shortening the search to specific words")
37-
console.print("- Try using the wildcard operator [bold]*[/bold] to search for partial words")
38-
console.print("- Try using the [bold]OR[/bold] operator to search for multiple words")
39-
if len(text.split(" ")) > 1:
40-
example_or = text.replace(" ", " OR ")
41-
console.print(f" - EX: \"[bold]{example_or}[/bold]\"")
42-
else:
43-
console.print(f" - EX: \"[bold]foo OR [bold]bar[/bold]\"")
36+
console.print(f"[yellow]No matches found[/yellow]\n"
37+
"- Try shortening the search to specific words\n"
38+
"- Try using the wildcard operator [bold]*[/bold] to search for partial words\n"
39+
"- Try using the [bold]OR[/bold] operator to search for multiple words\n"
40+
" - EX: \"foo OR bar\"")
4441
sys.exit(1)
4542

4643
return res

0 commit comments

Comments
 (0)