[twitter] quick and dirty fix for /media changes (#4898)

This commit is contained in:
Mike Fährmann
2023-12-09 15:38:42 +01:00
parent 9a8dc6b02b
commit c55955db03

View File

@@ -1439,7 +1439,12 @@ class TwitterAPI():
for instr in instructions:
instr_type = instr.get("type")
if instr_type == "TimelineAddEntries":
entries = instr["entries"]
if entries:
entries.extend(instr["entries"])
else:
entries = instr["entries"]
elif instr_type == "TimelineAddToModule":
entries = instr["moduleItems"]
elif instr_type == "TimelineReplaceEntry":
entry = instr["entry"]
if entry["entryId"].startswith("cursor-bottom-"):
@@ -1487,6 +1492,11 @@ class TwitterAPI():
if esw("tweet-"):
tweets.append(entry)
elif esw("profile-grid-"):
if "content" in entry:
tweets.extend(entry["content"]["items"])
else:
tweets.append(entry)
elif esw(("homeConversation-",
"profile-conversation-",
"conversationthread-")):