Fix tweets behind 'Show more replies' button getting missed

Fixes #572
This commit is contained in:
JustAnotherArchivist
2023-02-19 03:29:39 +00:00
parent f1cb96b685
commit fe5d90b748

View File

@@ -776,7 +776,8 @@ class _TwitterAPIScraper(snscrape.base.Scraper):
newCursor = entryCursor
if entryCursorStop is not None:
stopOnEmptyResponse = entryCursorStop
elif entry['entryId'].startswith('cursor-showMoreThreadsPrompt-'): # E.g. 'offensive' replies button
elif entry['entryId'].startswith('cursor-showMoreThreadsPrompt-') or entry['entryId'].startswith('cursor-showmorethreads-'):
# E.g. 'offensive' replies and 'Show more replies' button
promptCursor = entryCursor
elif direction is _ScrollDirection.BOTH and bottomCursorAndStop is None and (entry['entryId'] == 'sq-cursor-bottom' or entry['entryId'].startswith('cursor-bottom-')):
newBottomCursorAndStop = (entryCursor, entryCursorStop or False)