Update search

This commit is contained in:
Swee 2024-10-05 15:09:51 -07:00
parent 9b3a8ff218
commit b164f60997

View file

@ -3,10 +3,6 @@ import duckduckgo_search
from sys import argv from sys import argv
try: try:
request = DDGS().text(" ".join(argv[3:])) request = DDGS().text(" ".join(argv[3:]))
for i in range(0,3): print(request[0]["href"] + " ⁜ " + request[0]["title"] + " ⁜ " + request[0]["body"])
try:
print(request[i]["href"] + " ⁜ " + request[i]["title"] + " ⁜ " + request[i]["body"])
except:
break
except duckduckgo_search.exceptions.RatelimitException: except duckduckgo_search.exceptions.RatelimitException:
print("DuckDuckGo was rate limited, please try again later.") print("DuckDuckGo was rate limited, please try again later.")