Repository navigation
fix(gumtree): South Africa ids are refs — widen id types, 0.60.1 (SCR-295) - #64
Merged
Merged
Conversation
…-295)
gumtree.co.za re-platformed on 2026-10-12 and the API now serves market="za"
from the new site, whose category, location and listing ids are refs
('p6dnh', 'dkp8y', 'ls26bvmcpnsqmz7l9jz'). 0.60.0 typed those ids as int, so
every za tree / facet / suggestion response failed validation.
- TreeNode.id, TreeResponse.id, CategoryRef.id, CategoryFacet.id,
LocationSuggestion.id, category_id and category_ids are int | str
(uk/au still return ints; int callers are unaffected)
- list_categories / list_locations take parent_id: int | str
- docstrings and examples use real za refs and filter keys (make:toyota …)
- za fixtures re-captured from the live API on 2026-10-13
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Why
gumtree.co.za replaced its old site with a new Nuxt app on 2026-10-12. The API now serves
market="za"from the site's new JSON API (scrape-badger/scrapebadger#2461, deployed). Category, location and listing ids there are refs, not numbers:p6dnhis Cars & Bakkies.dkp8yis Gauteng.ls26bvmcpnsqmz7l9jzis a listing.0.60.0 typed those ids as
int, so every za tree, facet, suggestion and location-suggestion response failed validation.Change
inttoint | str:TreeNode.id,TreeResponse.id,CategoryRef.id,CategoryFacet.id,LocationSuggestion.id,category_id(search response, listing summary, listing detail) andcategory_ids.list_categories/list_locationstakeparent_id: int | str, so za refs can be passed.search(market="za", category="p6dnh", location="dkp8y", filters="make:toyota")make/model/fuelType/year/mileageKmprice_typeza valuesASKING_PRICE/POA;short_id,lifetime_listingsandtotal_viewsare no longer published; zamember_since_year.tests/fixtures/gumtree_samples.jsonwere re-captured from the live API on 2026-10-13 (search, listing, and a za category tree with string ids). uk/au fixtures are untouched.parent_id.pyproject.toml,__version__,SDK_VERSION,uv.lock) with a CHANGELOG entry.Checks
ruff check,ruff format --check,mypy src/(224 files, no issues) andpytest --ignore=tests/e2e: 870 passed, 41 of them gumtree.Linear: SCR-295
🤖 Generated with Claude Code