Fix empty page counter not getting reset on results

This commit is contained in:
JustAnotherArchivist
2023-01-13 06:59:51 +00:00
parent 2196bdf3e8
commit 28f5a45825

View File

@@ -808,6 +808,8 @@ class _TwitterAPIScraper(snscrape.base.Scraper):
if self._maxEmptyPages and emptyPages >= self._maxEmptyPages:
_logger.warning(f'Stopping after {emptyPages} empty pages')
break
else:
emptyPages = 0
if not newCursor or (stopOnEmptyResponse and tweetCount == 0):
# End of pagination
if promptCursor is not None: