From e6f89cf73b3109b5bdd0e9cb63fb71333bbc265a Mon Sep 17 00:00:00 2001 From: Swee Date: Sat, 5 Oct 2024 15:04:18 -0700 Subject: [PATCH] Update search --- cc/search | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cc/search b/cc/search index dc2fb60..4bc920a 100644 --- a/cc/search +++ b/cc/search @@ -2,4 +2,8 @@ from duckduckgo_search import DDGS from sys import argv print("Please stand by...") request = DDGS().text(" ".join(argv[3:])) -print(request[0]["href"] + " ⁜ " + request[0]["title"] + " ⁜ " + request[0]["body"]) \ No newline at end of file +for i in range(0,2): + try: + print(request[i]["href"] + " ⁜ " + request[i]["title"] + " ⁜ " + request[i]["body"]) + except: + break