From b43ad2df811e1bc253b5e88c1ff4740160b4e68f Mon Sep 17 00:00:00 2001 From: Alex Parsons Date: Mon, 23 Dec 2024 20:19:58 +0000 Subject: [PATCH] [sp] Fix download paging. - should fetch more results based on the search returns, rather then the number of headers those link to. --- pyscraper/sp_2024/download.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyscraper/sp_2024/download.py b/pyscraper/sp_2024/download.py index 4bf87dc9..a671606f 100644 --- a/pyscraper/sp_2024/download.py +++ b/pyscraper/sp_2024/download.py @@ -72,7 +72,7 @@ def get_debate_groupings(start_date: str, end_date: str) -> list[DebateGrouping] start_date, end_date, search_page ) meeting_urls.extend(page_result_urls) - if heading_count < 10: + if len(page_result_urls) < 10: keep_fetching = False else: search_page += 1