Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/app/api/discover/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ export const GET = async (req: Request) => {
selectedTopic.query.map(async (query) => {
return (
await searchSearxng(`site:${link} ${query}`, {
engines: ['bing news'],
pageno: 1,
categories: ['news'],
time_range: ['month'],
language: 'en',
pageno: 1,
})
).results;
}),
Expand All @@ -68,9 +69,10 @@ export const GET = async (req: Request) => {
await searchSearxng(
`site:${selectedTopic.links[Math.floor(Math.random() * selectedTopic.links.length)]} ${selectedTopic.query[Math.floor(Math.random() * selectedTopic.query.length)]}`,
{
engines: ['bing news'],
pageno: 1,
categories: ['news'],
time_range: ['month'],
language: 'en',
pageno: 1,
},
)
).results;
Expand Down
1 change: 1 addition & 0 deletions src/lib/searxng.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ interface SearxngSearchOptions {
engines?: string[];
language?: string;
pageno?: number;
time_range?: string[];
}

interface SearxngSearchResult {
Expand Down