mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-13 03:26:30 +00:00
Optimize empty search queries
This commit is contained in:
parent
7639883c6a
commit
2effa08c32
1 changed files with 3 additions and 0 deletions
|
@ -42,6 +42,9 @@ proc getSearch*[T](query: Query; after, agent: string): Future[Result[T]] {.asyn
|
||||||
"reset_error_state": "false"
|
"reset_error_state": "false"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if param in ["include:nativeretweets", "-filter:nativeretweets", ""]:
|
||||||
|
return Result[T](query: query, beginning: true)
|
||||||
|
|
||||||
let json = await fetchJson(base / searchUrl ? params, headers)
|
let json = await fetchJson(base / searchUrl ? params, headers)
|
||||||
if json == nil: return Result[T](query: query, beginning: true)
|
if json == nil: return Result[T](query: query, beginning: true)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue