Commit graph

6 commits

Author SHA1 Message Date
6a570f2f12 Fail backup when a fresh export cannot be requested 2026-10-08 09:39:49 +01:00
56dff875e7 Fix bot detection causing blank page from Goodreads
Goodreads returns an empty HTML page to headless browsers it identifies
as automated (navigator.webdriver=true, AutomationControlled feature).
This caused the Export Library button to never be found.

- Launch Chromium with --disable-blink-features=AutomationControlled
- Set a realistic user agent and viewport on the browser context
- Strip navigator.webdriver via an init script
- Guard the logged_in check so a blank page isn't mistaken for a session
- Wait for networkidle before querying the export button, and use
  wait_for(visible) instead of is_visible() to tolerate JS render delay
- Add CSS class fallback (button.js-LibraryExport) if role lookup fails
- Add AGENTS.md documenting the bot detection pattern and export flow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 11:53:42 +00:00
ae932b26b9 Improve backup flow to wait for export readiness instead of fixed delay
Replace the old fixed 10-minute wait with readiness-based waits on the export link state, so exports start downloading as soon as Goodreads marks them ready.

Also harden login selectors/timeouts, add fallback CSV fetching when browser download events do not fire, and add CLI modes for --check-login, --login-only, --no-headless, and --har-path.

Closes #3
2026-02-17 13:14:57 +00:00
4ac90301d5 Backup should run headless 2024-04-17 09:55:00 +01:00
271251c1f4 Fix login
Closes: #2
2024-04-17 08:59:36 +01:00
b678e6fa68 First attempt, seems to work
Closes: #1
2023-12-22 15:53:55 +00:00