@@ -20,7 +20,7 @@ async def _scroll_and_load_listings(page: Page, max_entries: int = 100, max_no_c
2020 current_count = len (current_cards )
2121
2222 msg = f"Iteration { iteration + 1 } : Found { current_count } property cards"
23- logger .info (msg )
23+ logger .debug (msg )
2424
2525 if current_count >= max_entries :
2626 msg = f"Reached target of { max_entries } entries"
@@ -43,7 +43,7 @@ async def _scroll_and_load_listings(page: Page, max_entries: int = 100, max_no_c
4343
4444 if is_visible :
4545 msg = "Reached bottom of page (search-list-save-search-parent element is visible)"
46- logger .info (msg )
46+ logger .debug (msg )
4747 break
4848
4949 if current_count == previous_count :
@@ -79,9 +79,9 @@ async def _scroll_and_load_listings(page: Page, max_entries: int = 100, max_no_c
7979 back_scroll = cryptogen .randint (100 , 300 )
8080 try :
8181 await page .evaluate (f"""
82- const searchContainer = document.querySelector('[class*="search-page-list-container"]');
83- searchContainer.scrollTop += { back_scroll } ;
84- """ )
82+ const searchContainer = document.querySelector('[class*="search-page-list-container"]');
83+ searchContainer.scrollTop += { back_scroll } ;
84+ """ )
8585 except PlaywrightError as e :
8686 wrn = f"Scroll attempt failed: { e } , trying window scroll"
8787 logger .warning (wrn )
@@ -92,15 +92,15 @@ async def _scroll_and_load_listings(page: Page, max_entries: int = 100, max_no_c
9292 final_cards = await page .query_selector_all ('article[data-test="property-card"]' )
9393 final_count = len (final_cards )
9494 msg = f"Lazy loading complete. Total property cards loaded: { final_count } "
95- logger .info (msg )
95+ logger .debug (msg )
9696
9797 # Scroll back to top to ensure all content is properly rendered
9898 await page .evaluate ("""
99- const searchContainer = document.querySelector('[class*="search-page-list-container"]');
100- if (searchContainer) {
101- searchContainer.scrollTop = 0;
102- } else {
103- window.scrollTo(0, 0);
104- }
99+ const searchContainer = document.querySelector('[class*="search-page-list-container"]');
100+ if (searchContainer) {
101+ searchContainer.scrollTop = 0;
102+ } else {
103+ window.scrollTo(0, 0);
104+ }
105105 """ )
106106 await page .wait_for_timeout (1500 )
0 commit comments