[instagram] fix 'AttributeError' in GraphQL pagination (#5920)
This commit is contained in:
@@ -991,9 +991,9 @@ class InstagramGraphqlAPI():
|
|||||||
if not info["has_next_page"]:
|
if not info["has_next_page"]:
|
||||||
return extr._update_cursor(None)
|
return extr._update_cursor(None)
|
||||||
elif not data["edges"]:
|
elif not data["edges"]:
|
||||||
s = "" if self.item.endswith("s") else "s"
|
s = "" if self.extractor.item.endswith("s") else "s"
|
||||||
raise exception.StopExtraction(
|
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"])
|
variables["after"] = extr._update_cursor(info["end_cursor"])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user