Skip to content

Fix broken scraper and other fixes to make it work again - #2

Open
greaterthanstar wants to merge 8 commits into
bannert1337:mainfrom
greaterthanstar:fix.broken.scraper
Open

Fix broken scraper and other fixes to make it work again#2
greaterthanstar wants to merge 8 commits into
bannert1337:mainfrom
greaterthanstar:fix.broken.scraper

Conversation

@greaterthanstar

Copy link
Copy Markdown

Hey guys,

I love this project, it works so well for quickly finding books but it seems to have been abandoned.

Recently it stopped working so I've been using Antigravity to get it to work again. A quick fix for you might be to

  • switch to my fork and change the Repository field in Unraid to be ghcr.io/greaterthanstar/ephemera:latest which will pull my latest changes
  • switch your AA url to the .is version. .pk is using DDos-Guard which cannot be bypassed by Flaresolvr.

The changes I made are in this PR. Basically it:

Scraper update

Anna's Archive recently redesigned their search result HTML across all of their domains (.is, .pk, .org, etc.):

  • Search result links changed from /md5/{hash} to /books/{id}.
  • HTML card containers changed to Tailwind layout (div.flex.gap-[18px]).

Automatic Mirror Fallback & URL Sanitization Code

  • Double Slash Fix: Fixed buildSearchUrl() so URLs with trailing slashes don't generate invalid //search requests.
    Automatic Fallback: Added code in scraper.ts so that if your configured AA_BASE_URL (like .pk) gets blocked by DDoS-Guard, the scraper automatically routes through the .is version in the background.

Developer Build Fix

Fixed pnpm dev in package.json by adding "predev": "pnpm --filter @ephemera/shared build" so @ephemera/shared builds automatically when running local development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant