v2.5.0 — CLI-credentials auth + scraper-core dedup
Highlights
CLI-credentials auth fallback — one brightdata login now authenticates the SDK too. With no token given, the client falls back to the token already saved by the Bright Data CLI:
client = BrightDataClient() # zero configuration on a logged-in machineResolution order: token= parameter → BRIGHTDATA_API_TOKEN / BRIGHTDATA_API_KEY env vars → CLI login → actionable error mentioning brightdata login.
Every request now reports how the token was obtained via the User-Agent header (auth=param / env / cli_credentials) — the token itself is never logged.
Internal: shared ScraperCore — the 7 search scrapers (Amazon, ChatGPT, Instagram, LinkedIn, Pinterest, TikTok, YouTube) now share one construction core instead of hand-copied __init__s, fixing drift where Amazon/ChatGPT/LinkedIn search were missing the BRIGHTDATA_API_TOKEN environment fallback that the others already had.
Changes
BrightDataClient/SyncBrightDataClient: new token resolution precedence +auth_sourcereportingAsyncEngine:User-Agentnowbrightdata-sdk-python/{version} (auth=...)(wasbrightdata-sdk/{version})ScraperCore: shared base for search-scraper construction (−174 lines of duplicated code)- README: documents the CLI login fallback
Full diff: v2.4.1...main