Skip to content
Discussion options

You must be logged in to vote

The issue is that scan_full_page=True scrolls the page, but infinite scroll sites like KSL Classifieds load new items via API calls triggered by scroll position — and the default scroll speed is often too fast for the content to load before the next scroll happens.

A few things to try:

1. Use js_code with manual scroll + wait loop

This gives you full control over the scroll behavior:

config = CrawlerRunConfig(
    extraction_strategy=JsonXPathExtractionStrategy(schema, verbose=True),
    js_code="""
        // Scroll to bottom repeatedly with pauses for content to load
        const delay = ms => new Promise(r => setTimeout(r, ms));
        let lastHeight = 0;
        let attempts = 0;

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by SohamKukreti
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants