Skip to content

Commit

Permalink
get first element
Browse files Browse the repository at this point in the history
- fix multiple elements found error
  • Loading branch information
da-vaibhav committed Oct 9, 2024
1 parent b632574 commit d8875e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extract-kindle-book.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ async function main() {
}

async function getPageNav() {
const footerText = await page.locator('ion-footer ion-title').textContent()
const footerText = await page.locator('ion-footer ion-title').first().textContent()
return parsePageNav(footerText)
}

Expand Down

0 comments on commit d8875e5

Please sign in to comment.