This commit is contained in:
Davixk 2025-08-17 15:30:53 +02:00 committed by GitHub
commit 8a79da9016
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View file

@ -46,9 +46,10 @@ export const GET = async (req: Request) => {
selectedTopic.query.map(async (query) => { selectedTopic.query.map(async (query) => {
return ( return (
await searchSearxng(`site:${link} ${query}`, { await searchSearxng(`site:${link} ${query}`, {
engines: ['bing news'], categories: ['news'],
pageno: 1, time_range: ['month'],
language: 'en', language: 'en',
pageno: 1,
}) })
).results; ).results;
}), }),
@ -68,9 +69,10 @@ export const GET = async (req: Request) => {
await searchSearxng( await searchSearxng(
`site:${selectedTopic.links[Math.floor(Math.random() * selectedTopic.links.length)]} ${selectedTopic.query[Math.floor(Math.random() * selectedTopic.query.length)]}`, `site:${selectedTopic.links[Math.floor(Math.random() * selectedTopic.links.length)]} ${selectedTopic.query[Math.floor(Math.random() * selectedTopic.query.length)]}`,
{ {
engines: ['bing news'], categories: ['news'],
pageno: 1, time_range: ['month'],
language: 'en', language: 'en',
pageno: 1,
}, },
) )
).results; ).results;

View file

@ -6,6 +6,7 @@ interface SearxngSearchOptions {
engines?: string[]; engines?: string[];
language?: string; language?: string;
pageno?: number; pageno?: number;
time_range?: string[];
} }
interface SearxngSearchResult { interface SearxngSearchResult {