merge #4287: [twitter] Fix following extractor not getting all users

This commit is contained in:
Mike Fährmann
2023-07-10 14:41:00 +02:00

View File

@@ -1774,7 +1774,7 @@ class TwitterAPI():
"features" : self._json_dumps(self.features_pagination)}
while True:
cursor = entry = stop = None
cursor = entry = None
params["variables"] = self._json_dumps(variables)
data = self._call(endpoint, params)["data"]
@@ -1803,11 +1803,8 @@ class TwitterAPI():
yield user
elif entry["entryId"].startswith("cursor-bottom-"):
cursor = entry["content"]["value"]
elif instr["type"] == "TimelineTerminateTimeline":
if instr["direction"] == "Bottom":
stop = True
if stop or not cursor or not entry:
if not cursor or cursor.startswith(("-1|", "0|")) or not entry:
return
variables["cursor"] = cursor