Skip to content

Commit

Permalink
Fix parsing "Show more" without digits
Browse files Browse the repository at this point in the history
  • Loading branch information
zedeus committed Oct 1, 2020
1 parent 2c6cabb commit 06f7a8d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/parser.nim
Expand Up @@ -321,8 +321,11 @@ proc parseThread(js: JsonNode; global: GlobalObjects): tuple[thread: Chain, self
let
cursor = content{"timelineCursor"}
more = cursor{"displayTreatment", "actionText"}.getStr
result.thread.more = parseInt(more[0 ..< more.find(" ")])
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:
var tweet = finalizeTweet(global, entry.getId)
if not tweet.available:
Expand Down

0 comments on commit 06f7a8d

Please sign in to comment.