Infinite scroll attempts to scroll even after it gets to the "end" of scroll

The below sitemap institutes an infinite scroll to scrape all the available data. Each scroll retrieves 10 records (in this case) and there are approximately 650 records, so the webscraper scrolls approximately 64-65 times. The initial scroll seems to work. But once the scroll gets to the end of the entirety of the data, webscraper.io seems to be stuck in some kind of infinite loop where it cannot detect that this is indeed the end of the scrolling that is possible. This infinite loop involves webscraper plugin scrolling all the way to the top, then scrolling all the way down - and it will repeat this endlessly. What am I doing wrong here?

Url: https://www.princess.com/cruise-search/results

Sitemap:
{"_id":"princess","startUrl":["https://www.princess.com/cruise-search/results"],"selectors":[{"id":"cruise-link","type":"SelectorLink","parentSelectors":["_root","infinite_scroll"],"selector":".ct-title a","multiple":true,"delay":0},{"id":"cruise-details","type":"SelectorText","parentSelectors":["cruise-link"],"selector":"h1","multiple":false,"regex":"","delay":0},{"id":"Itinerary","type":"SelectorTable","parentSelectors":["cruise-link"],"selector":"table","multiple":true,"columns":[{"header":"Date","name":"Date","extract":true},{"header":"Port","name":"Port","extract":true},{"header":"Arrive","name":"Arrive","extract":true},{"header":"Depart","name":"Depart","extract":true}],"delay":0,"tableDataRowSelector":"tr.ports-table-row","tableHeaderRowSelector":"tr.medium-bg"},{"id":"ship_name","type":"SelectorText","parentSelectors":["cruise-link"],"selector":"div.font-size-p5.xs-font-size-p1:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"start_date","type":"SelectorText","parentSelectors":["cruise-link"],"selector":"div.gotham-xn-medium:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"fees","type":"SelectorText","parentSelectors":["cruise-link"],"selector":"span.gft-amount","multiple":false,"regex":"","delay":0},{"id":"start_end_locations","type":"SelectorText","parentSelectors":["cruise-link"],"selector":"div.col-md-pad-10-right","multiple":false,"regex":"","delay":0},{"id":"num_days","type":"SelectorText","parentSelectors":["cruise-link"],"selector":".gotham-xn-book span:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"num_ports","type":"SelectorText","parentSelectors":["cruise-link"],"selector":"span.no-wrap:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"num_scenic_crusing_days","type":"SelectorText","parentSelectors":["cruise-link"],"selector":"span.no-wrap:nth-of-type(3)","multiple":false,"regex":"","delay":0},{"id":"room_type_price","type":"SelectorText","parentSelectors":["cruise-link"],"selector":"span.meta-price","multiple":false,"regex":"(\d+((\.|\,)\d+)+)","delay":0},{"id":"room_type","type":"SelectorText","parentSelectors":["cruise-link"],"selector":"div.font-size-btn","multiple":false,"regex":"","delay":0},{"id":"infinite_scroll","type":"SelectorElementScroll","parentSelectors":["_root","infinite_scroll"],"selector":"div#results-wrapper section section div article","multiple":true,"delay":"5000"}]}

Your infinite_scroll selector has been set to child of itself (recursive). This is not needed for Element scroll down (it already knows how keep scrolling down, based on selector), and would result in the loop issue you described.

Make sure only _root is its parent.

Also, you do not need to make cruise-link as child of _root either. Just child of infinite_scroll is enough.

Thank you leemeng. Your suggestions worked for me.