Skip to content

Commit

Permalink
fix: check for next page button
Browse files Browse the repository at this point in the history
  • Loading branch information
mevljas committed Jan 26, 2025
1 parent 278e13a commit 54d7421
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/extract_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ async def parse_page(
item_id, data = await parse_result(result)
extracted_data[item_id] = data

# Check if there is a next page button.
more_pages = (
await browser_page.locator("xpath=//*[@id='pagination']/ul/li[4]/a").count() > 0
await browser_page.locator("xpath=//*[@id='pagination']/ul/li[contains(@class, 'paging_next')]").count() > 0
)

logger.info("Parsing page %s finished.", browser_page.url)
Expand Down

0 comments on commit 54d7421

Please sign in to comment.