Repository navigation
feat(google): document the condensed Light Search response (0.89.0, SCR-774) - #118
Merged
Merged
Conversation
…CR-774) GET /v1/google/light/search now returns each organic result's own URL in `link` and a smaller response with no null fields (scrape-badger/scrapebadger#3741). light() already calls that endpoint; this brings what the SDK says about it in line and tests the request. - light() docstring: the new response shape, the 422s for tbm / udm / ludocid / lsig / kgmid / ibp / uds, the 503 with Retry-After: 1 (not billed), and device / user_agent being echoed only. Signature unchanged. - resolve() docstring: only search() results carry link_token. - docs/google.md: a "Light Search" section, a methods-table row, and the link-resolving text limited to search(). - get_raw() leaves out None params, as JSON requests already did: output="html" sent every unset parameter as an empty value (lat=, tbm=, ...). - Tests: light() calls /v1/google/light/search with exactly its params, for JSON and HTML, and returns the condensed answer as is. - Version 0.89.0 and a CHANGELOG entry. 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! |
The `if params:` guard left a branch no caller takes (both callers pass params), which codecov/patch counted as a partial line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Google Light Search now returns each organic result's own URL and a smaller response (API: scrape-badger/scrapebadger#3741). This updates the Python SDK to match. Node SDK: scrape-badger/scrapebadger-node#108.
What changed
google.search.light()already callsGET /v1/google/light/search. Its docstring now describes the new response:search_parameters,search_metadata,search_information(query_displayed,url),organic_results(position,title,link,displayed_link,snippet,rank,page_rank) andpagination(current). Fields without a value are left out. It also covers the 422s (tbm,udmother than14/web,ludocid,lsig,kgmid,ibp,uds) and the 503 withRetry-After: 1(not billed).resolve()docstring: onlysearch()results carrylink_token. Light results need no resolving.docs/google.md: a new "Light Search" section, a methods-table row, and the link-resolving text now coverssearch()only.get_raw()(used byoutput="html") sent every unset parameter as an empty value (lat=,tbm=, ...). It now leaves outNonevalues, as JSON requests already did.light()calls/v1/google/light/searchwith exactly its parameters, for JSON and HTML, and returns the condensed answer as is.No public method signature changed.
light()matches the monorepo surface lock (sdk/codegen/facade/python-v1-surface.json) exactly.Checks
ruff check,ruff format --check,mypy src/: passpytest --ignore=tests/e2e: all passRelease is a separate step; nothing is published from this PR.
🤖 Generated with Claude Code