| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
v2.4.1: X (Twitter) scraper + limit_per_input
The 7 search classes hand-copied the base's __init__ and context manager; they now inherit a shared core. Amazon/ChatGPT/LinkedIn search gain the standard env-token fallback. No public API or behavior removed.
…gent Token resolution: param → env (BRIGHTDATA_API_TOKEN, BRIGHTDATA_API_KEY) → ~/.../brightdata-cli/credentials.json (read-only) → actionable error. User-agent is now brightdata-sdk-python/<ver> (auth=param|env|cli_credentials).
Prevents a false pass/failure depending on whether the local machine has ~/.config/brightdata-cli/credentials.json (e.g. after 'brightdata login'). The new CLI-credentials fallback means an empty environment no longer guarantees no token is found.
v2.5.0: CLI-credentials auth + scraper-core dedup
# Conflicts: # src/brightdata/client.py
| Back | FazBrowse Home | New Git URL |
Release PR: syncs main with dev, bringing in everything merged into dev since the last release (v2.4.1 on main).
Included PRs
#46 — v2.5.0: CLI-credentials auth + scraper-core dedup
Python half of the cross-SDK task "SDKs resolve credentials from the CLI store + report auth source in user-agent" (the JS half lives in sdk-js).
Before: the SDK only accepted a token via the token= parameter or the BRIGHTDATA_API_TOKEN env var — a user who had already run brightdata login still had to copy an API key by hand.
Now: with no token given, the SDK falls back to the key the CLI already saved. One login authenticates everything:
Resolution order (first hit wins):
Every request now reports how the token was obtained — making SDK onboarding measurable (feeds the sdk_auth_source Mixpanel property):
Ticket checklist:
Note: engines created by standalone scraper construction (e.g. AmazonScraper(bearer_token=...) without a client) keep today's behavior and omit the (auth=…) field — the ticket scopes the fallback to the client constructors; extending it there is a small follow-up.
Also included: Internal shared ScraperCore. The 7 search classes each hand-copied the base scraper's __init__ + context manager and had drifted (Amazon/ChatGPT/LinkedIn search lacked the env-token fallback). They now inherit one shared core: −174 lines, drift gone.
Tests: 321 passing (57 new). Version → 2.5.0.
Post-merge fix included in this release PR: test_raises_without_token was updated to mock read_cli_credentials(), since the new CLI fallback meant the test was not hermetic on machines with real brightdata login credentials present.
#43 — v2.4.1: X (Twitter) scraper + limit_per_input
Adds the X (Twitter) Web Scraper (client.scrape.x) — previously missing from the SDK.