Improve pagination behavior #11
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Some sites, such as HardX, will keep serving the last page when you paginate beyond the available pages.
needNextPage()insrc/updates.jsis not dealing with this properly at the moment.For
--last 1000, it will keep paginating until it found 1000 scenes, even if the last 300 came from that same last page. This probably affectsnullDateLimitsimilarly, but is less of a problem, as it will stop eventually.However, for
--latest, it will keep paginating until the date of the last scene on the page is older than the requested date range. If the last scene on the last page is still newer than the date range, it will keep paginating forever, always getting the last page.This was originally resolved by checking
uniqueReleases.length, however if you had already scraped a full page before, it would not find any unique releases on page 1, and thus stop paginating without checking page 2 for unique scenes.A new approach will probably need to distinguish current unique releases from database unique releases.
Now only using scraped scenes for pagination, and filtering database duplicates from accumulated result.