Skip to content

feat(ebay): expose pagination.has_more; is_sponsored is now nullable#18

Merged
0xGhostCasper merged 2 commits into
mainfrom
fix/ebay-has-more-sponsored
Jul 25, 2026
Merged

feat(ebay): expose pagination.has_more; is_sponsored is now nullable#18
0xGhostCasper merged 2 commits into
mainfrom
fix/ebay-has-more-sponsored

Conversation

@0xGhostCasper

Copy link
Copy Markdown
Member

Tracks scrape-badger/scrapebadger#609.

Pagination.has_more — the stop signal for bulk extraction of completed/sold listings. The model uses extra="ignore", so without this field the SDK silently dropped it and users could not page to the end: total_pages/total_results are null on the sold grid, and past the last page eBay re-serves that page instead of returning empty.

page, sold = 1, []
while True:
    r = client.ebay.completed(query="iphone 13", per_page=240, page=page)
    sold += r.results
    if not r.results or not r.pagination.has_more:
        break
    page += 1

SearchResult.is_sponsored — now bool | None, defaulting to None. eBay renders its "Sponsored" badge into every card as anti-scraping bait, so the API reports null rather than true for 100% of results.

Both are additive/widening: existing code reading is_sponsored still type-checks against bool | None consumers, and no field was removed.

has_more is the stop signal for bulk extraction of completed/sold listings.
Without it the field was dropped by the model (extra=ignore), so SDK users
could not page to the end: total_pages/total_results are null on that grid,
and past the last page eBay re-serves it rather than returning empty.

is_sponsored becomes bool | None, defaulting to None. eBay renders its
Sponsored badge into every card as anti-scraping bait, so the API now reports
null instead of true-for-everything.
@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@0xGhostCasper
0xGhostCasper merged commit aa960b1 into main Jul 25, 2026
7 checks passed
@0xGhostCasper
0xGhostCasper deleted the fix/ebay-has-more-sponsored branch July 25, 2026 09:49
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.

2 participants