From d8875e512aa563708d015984dba5310823a97080 Mon Sep 17 00:00:00 2001 From: vaibhav Date: Wed, 9 Oct 2024 23:01:57 +0530 Subject: [PATCH] get first element - fix multiple elements found error --- src/extract-kindle-book.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extract-kindle-book.ts b/src/extract-kindle-book.ts index c50e3f5..e93554c 100644 --- a/src/extract-kindle-book.ts +++ b/src/extract-kindle-book.ts @@ -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) }