From 7b5a8d87f219b989127a3d4754c437edc9c9e45b Mon Sep 17 00:00:00 2001 From: nakashin1005 <53631140+nepinepinepi@users.noreply.github.com> Date: Sun, 8 Jun 2025 20:14:14 +0900 Subject: [PATCH] Fix: Resolve incomplete many highlights sync by increasing timeout The Kindle notebook page uses infinite scrolling to load books. The previous 1-second timeout was insufficient to load all books for users with many highlights, resulting in an incomplete sync. This change increases the scraping timeout from 1000ms to 30000ms, allowing more time for the page to load additional books before parsing. --- src/scraper/scrapeBooks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scraper/scrapeBooks.ts b/src/scraper/scrapeBooks.ts index ebeeea8..6f273bc 100644 --- a/src/scraper/scrapeBooks.ts +++ b/src/scraper/scrapeBooks.ts @@ -59,7 +59,7 @@ export const parseBooks = ($: Root): Book[] => { const scrapeBooks = async (): Promise => { const region = currentAmazonRegion(); - const { dom } = await loadRemoteDom(region.notebookUrl, 1000); + const { dom } = await loadRemoteDom(region.notebookUrl, 30000); return parseBooks(dom); };