feat(web): send honest nanobot UA for Keenable
Keenable is a first-party API, so identify as nanobot/<version> instead of the shared spoofed-browser User-Agent used by scraping providers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
Xubin Ren
co-authored by
Claude Opus 4.8
parent
6fcf65a8e3
commit
4f6e5e9cb8
@@ -143,7 +143,7 @@ async def test_keenable_search(monkeypatch):
|
||||
async def mock_post(self, url, **kw):
|
||||
assert "keenable" in url
|
||||
assert kw["headers"]["X-API-Key"] == "keen-key"
|
||||
assert kw["headers"]["User-Agent"] == "nanobot-search-test"
|
||||
assert kw["headers"]["User-Agent"].startswith("nanobot/")
|
||||
return _response(json={
|
||||
"results": [{
|
||||
"title": "Keen",
|
||||
|
||||
Reference in New Issue
Block a user