1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-07-07 11:42:38 +02:00

NodeIterator: Support single page data

This commit is contained in:
Alexander Graf 2023-05-15 07:37:34 +02:00
parent 14124b617e
commit 99c3960ad4

View File

@ -137,7 +137,7 @@ class NodeIterator(Iterator[T]):
if self._first_node is None:
self._first_node = node
return item
if self._data['page_info']['has_next_page']:
if self._data.get('page_info', {}).get('has_next_page'):
query_response = self._query(self._data['page_info']['end_cursor'])
if self._data['edges'] != query_response['edges'] and len(query_response['edges']) > 0:
page_index, data = self._page_index, self._data