Find TimelineAddEntries in tweets response (#1251)
See https://github.com/zedeus/nitter/issues/1250. Sometimes the API gives us more results and the tweets are no longer at index 0.
This commit is contained in:
@@ -364,7 +364,9 @@ proc parseGraphConversation*(js: JsonNode; tweetId: string; v2=true): Conversati
|
||||
if instructions.len == 0:
|
||||
return
|
||||
|
||||
for e in instructions[0]{"entries"}:
|
||||
for i in instructions:
|
||||
if i{"__typename"}.getStr == "TimelineAddEntries":
|
||||
for e in i{"entries"}:
|
||||
let entryId = e{"entryId"}.getStr
|
||||
if entryId.startsWith("tweet"):
|
||||
with tweetResult, e{"content", contentKey, resultKey, "result"}:
|
||||
|
||||
Reference in New Issue
Block a user