Repository navigation
fix(backfill): read prices from the item page when the data endpoint 404s - #46
Merged
Merged
Conversation
…404s Every id 404s under a freshly resolved buildId, the sentinel included, so the tool reads the whole catalogue as having no ChromieCraft data. The item page still carries the same payload in its __NEXT_DATA__ blob. The page is only consulted after a 404, and once it answers where the data endpoint did not, the run stays on the page so an unpriced item does not cost two requests.
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.
Changes Proposed:
wowauctions.fetch_item()falls back to the item page when the data endpoint returns 404, reading the same payload out of the page's__NEXT_DATA__blob.Issues Addressed:
SOURCE:
As of 2026-09-20
https://www.wowauctions.net/_next/data/{buildId}/auctionHouse/chromie-craft/chromiecraft/mergedAh/x-{id}.jsonreturns 404 for every id under a buildId resolved seconds earlier, including sentinel 4389. The sentinel check therefore re-resolves and still fails, and the tool concludes the whole catalogue is unpriced.https://www.wowauctions.net/auctionHouse/chromie-craft/chromiecraft/mergedAh/x-{id}serves the identical object atprops.pageProps.item, with the samestats.avg_price/stats.minimum_buyout/item_count/item_last_seenkeystransform.build_row()already reads.Tests Performed:
python3 -m unittest discover: 56 tests, all pass.How to Test the Changes:
cd tools/price-backfill && python3 -m unittest discover -vpython3 -c "import wowauctions; b=wowauctions.resolve_build_id(); print(wowauctions.fetch_item(b, 4389))"prints the item's stats.