mirror of https://github.com/zedeus/nitter
Fix parsing "Show more" without digits
This commit is contained in:
parent
2c6cabb4ab
commit
06f7a8d95f
|
@ -321,8 +321,11 @@ proc parseThread(js: JsonNode; global: GlobalObjects): tuple[thread: Chain, self
|
||||||
let
|
let
|
||||||
cursor = content{"timelineCursor"}
|
cursor = content{"timelineCursor"}
|
||||||
more = cursor{"displayTreatment", "actionText"}.getStr
|
more = cursor{"displayTreatment", "actionText"}.getStr
|
||||||
result.thread.more = parseInt(more[0 ..< more.find(" ")])
|
|
||||||
result.thread.cursor = cursor{"value"}.getStr
|
result.thread.cursor = cursor{"value"}.getStr
|
||||||
|
if more.len > 0 and more[0].isDigit():
|
||||||
|
result.thread.more = parseInt(more[0 ..< more.find(" ")])
|
||||||
|
else:
|
||||||
|
result.thread.more = -1
|
||||||
else:
|
else:
|
||||||
var tweet = finalizeTweet(global, entry.getId)
|
var tweet = finalizeTweet(global, entry.getId)
|
||||||
if not tweet.available:
|
if not tweet.available:
|
||||||
|
|
Loading…
Reference in New Issue