Nick: improvements to search

This commit is contained in:
Nicolas
2024-04-24 10:11:01 -07:00
parent f189589da4
commit 307ea6f5ec
5 changed files with 34 additions and 29 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
import { SearchResult } from "../../src/lib/entities";
import { google_search } from "./googlesearch";
import { serper_search } from "./serper";
@@ -21,7 +22,7 @@ export async function search({
proxy?: string;
sleep_interval?: number;
timeout?: number;
}) {
}) : Promise<SearchResult[]> {
try {
if (process.env.SERPER_API_KEY && !tbs) {
return await serper_search(query, num_results);