[instagram] fix 'AttributeError' in GraphQL pagination (#5920)

This commit is contained in:
Mike Fährmann
2024-08-01 09:04:08 +02:00
parent 42388dc819
commit 7d15ea6274

View File

@@ -991,9 +991,9 @@ class InstagramGraphqlAPI():
if not info["has_next_page"]:
return extr._update_cursor(None)
elif not data["edges"]:
s = "" if self.item.endswith("s") else "s"
s = "" if self.extractor.item.endswith("s") else "s"
raise exception.StopExtraction(
"%s'%s posts are private", self.item, s)
"%s'%s posts are private", self.extractor.item, s)
variables["after"] = extr._update_cursor(info["end_cursor"])