Fix extraction of tweets behind 'offensive' replies button

This commit is contained in:
JustAnotherArchivist
2023-02-19 06:26:35 +00:00
parent 6ba478657b
commit 280b972f22

View File

@@ -776,7 +776,7 @@ class _TwitterAPIScraper(snscrape.base.Scraper):
newCursor = entryCursor
if entryCursorStop is not None:
stopOnEmptyResponse = entryCursorStop
elif entry['entryId'].startswith('cursor-showMoreThreadsPrompt-') or entry['entryId'].startswith('cursor-showmorethreads-'):
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-')):