1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-08-18 04:39:39 +02:00

Fix for infinity loading if next page is empty (#1465)

This commit is contained in:
JeremyKj87 2022-03-26 15:57:45 +01:00 committed by GitHub
parent b808843efe
commit 569808f7a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,7 +133,7 @@ class NodeIterator(Iterator[T]):
return item
if self._data['page_info']['has_next_page']:
query_response = self._query(self._data['page_info']['end_cursor'])
if self._data['edges'] != query_response['edges']:
if self._data['edges'] != query_response['edges'] and len(query_response['edges']) > 0:
page_index, data = self._page_index, self._data
try:
self._page_index = 0