mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Cleanup
This commit is contained in:
parent
fd20fcf3ee
commit
7639883c6a
8 changed files with 19 additions and 25 deletions
|
|
@ -2,18 +2,11 @@ import httpclient, asyncdispatch, htmlparser
|
|||
import sequtils, strutils, json, xmltree, uri
|
||||
|
||||
import ".."/[types, parser, parserutils, formatters, query]
|
||||
import utils, consts, media
|
||||
import utils, consts, media, search
|
||||
|
||||
proc finishTimeline*(json: JsonNode; query: Query; after, agent: string): Future[Timeline] {.async.} =
|
||||
if json == nil: return Timeline(beginning: true, query: query)
|
||||
|
||||
result = Timeline(
|
||||
hasMore: json["has_more_items"].to(bool),
|
||||
maxId: json.getOrDefault("max_position").getStr(""),
|
||||
minId: json.getOrDefault("min_position").getStr("").cleanPos(),
|
||||
query: query,
|
||||
beginning: after.len == 0
|
||||
)
|
||||
result = getResult[Tweet](json, query, after)
|
||||
if json == nil: return
|
||||
|
||||
if json["new_latent_count"].to(int) == 0: return
|
||||
if not json.hasKey("items_html"): return
|
||||
|
|
|
|||
Loading…
Reference in a new issue