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:
|
if instructions.len == 0:
|
||||||
return
|
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
|
let entryId = e{"entryId"}.getStr
|
||||||
if entryId.startsWith("tweet"):
|
if entryId.startsWith("tweet"):
|
||||||
with tweetResult, e{"content", contentKey, resultKey, "result"}:
|
with tweetResult, e{"content", contentKey, resultKey, "result"}:
|
||||||
|
|||||||
Reference in New Issue
Block a user