Repository navigation
fix(crawl): send zenrows/<version> python from the Crawl client - #63
Merged
Merged
Conversation
…ients Every client in the Python SDK now sends the same User-Agent as the scraping client, so the API reads Crawl and Batch requests as Python SDK traffic. The Crawl client sent zenrows-crawl-python/<version>, and the Batch client zenrows-batch-python/<version>.
This change is about Crawl only. The Batch client keeps sending zenrows-batch-python/<version>, as on main.
StefanoGuerrini
self-requested a review
October 19, 2026 14:26
StefanoGuerrini
approved these changes
Oct 19, 2026
Merged
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.
Summary
The Crawl client in the Python software development kit (SDK) now sends the scraping client's User-Agent,
zenrows/<version> python. The API already reads that as Python SDK traffic. Its usage numbers then count crawls from the SDK as the SDK, not as plain API calls.What the task asked for
The API could not tell crawls created from the Python SDK apart from direct HTTP calls. The Crawl client sent
zenrows-crawl-python/<version>, which the API does not recognise. The Batch client is out of scope and keeps its current User-Agent.How the check confirmed it
pytest tests/test_crawl_client.py tests/test_batch_client.pyEncoded by: the User-Agent assertion added to
tests/test_crawl_client.py.How to try it
Run the tests above.
Provenance
zenrows/<version> pythonisDEFAULT_USER_AGENTinsrc/zenrows/client.py.user_agent=keeps their own value.Review
Human must verify:
zenrows-crawl-pythonvalue.Deviations
None.
Record owed
None.