Add scrape-heal — self-healing scraper loop (JavaScript) - #17
Open
Swastikbhat-lab wants to merge 1 commit into
Open
Swastikbhat-lab wants to merge 1 commit into
Swastikbhat-lab wants to merge 1 commit into
Conversation
A self-healing scraper loop: detects when a site redesign breaks selectors, derives replacements from the last good run's data, and only ships a repair after re-verifying it on the live page. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds scrape-heal to the JavaScript list.
It's a small TypeScript/Playwright loop that solves the boring problem most scrapers hit:
the site redesigns, the selectors stop matching, nothing errors, and you notice a week
later when the spreadsheet comes back empty. It remembers what the last good run looked
like, detects when the output shape drifts, repairs the selectors by finding the elements
that still contain the known-good data, and only ships the repair after re-verifying the
extraction on the live page. Includes a watchdog mode that alerts the moment a run goes red.
Try it in one command (Node ≥ 20) — no clone, no config:
(one-time:
npx playwright install chromium— the loop drives a real browser)MIT, TypeScript, no runtime deps beyond Playwright, CI-green test suite (31 tests).
Happy to adjust the description if the one-line format needs to be tighter.