mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Options cleanup
This commit is contained in:
parent
4c748b61a5
commit
4971491dfe
8 changed files with 28 additions and 28 deletions
|
|
@ -9,7 +9,7 @@ proc getResult[T](json: JsonNode; query: Query; after: string): Result[T] =
|
|||
hasMore: json["has_more_items"].to(bool),
|
||||
maxId: json.getOrDefault("max_position").getStr(""),
|
||||
minId: json.getOrDefault("min_position").getStr("").cleanPos(),
|
||||
query: query.some,
|
||||
query: some query,
|
||||
beginning: after.len == 0
|
||||
)
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ proc getSearch*[T](query: Query; after, agent: string): Future[Result[T]] {.asyn
|
|||
let html = parseHtml(json["items_html"].to(string))
|
||||
|
||||
when T is Tweet:
|
||||
result = await finishTimeline(json, some(query), after, agent)
|
||||
result = await finishTimeline(json, some query, after, agent)
|
||||
elif T is Profile:
|
||||
result.hasMore = json["items_html"].to(string) != "\n"
|
||||
for p in html.selectAll(".js-stream-item"):
|
||||
|
|
|
|||
Loading…
Reference in a new issue