Repository navigation
seleniumbase-rs 0.3.0
A breaking release: the experimental stealth scraping layer leaves this crate.
Removed
- BREAKING: the stealth scraping layer moved to its own repository,
seleniumbase-rs-stealth.
The featuresscrapeandimpersonate, the modulesseleniumbase_rs::wire,
seleniumbase_rs::scrapeandseleniumbase_rs::impersonate, and their
crate-root re-exports (BrowserScraper,CookieJar,StealthIdentity,
SessionPolicy,ScrapeError,BrowserKind,Emulation,TlsSpec,
H2Spec,HeaderSpec,ImpersonationProfile,CustomProfileBuilder,
impersonation_client,HttpSession,MitmProxy,StealthSession,
EphemeralCaand the rest) are gone from this crate. They are now the crates
seleniumbase-rs-wire(was the modulewire),seleniumbase-rs-scrape(was
the featurescrape) andseleniumbase-rs-impersonate(was the feature
impersonate), which build on the public API of this crate and stay
experimental. Depend on them by git, for example
seleniumbase-rs-scrape = { git = "https://github.com/MustCodeAl/seleniumbase-rs-stealth" },
and giveseleniumbase-rsby its plain git URL next to them so both resolve to
one commit (Stealth Scraping). - With the layer go the optional dependencies
psl,wreq,btls,
tokio-btls,brotli,hyper,hyper-utilandhttp-body-util; the
examplescapture_tls,capture_hints,capture_h2,cookie_jar,
browser_scraper,custom_profile,http_sessionandstealth_session; the
tests and fixtures of the layer; thejust scrape-gate,imp-gateand
measurerecipes and their mise tasks; thescrapeCI matrix entries and the
impersonateCI job; and CMake, NASM and LLVM from the build requirements. futures-utilwithout its default macros (select!/join!, unused), so the
futures-macroproc macro is no longer compiled.scraperwithout its default features (getoptsfor its own CLI, unused
parse-error text).flate2asks only for thezlib-rsbackendzipalready
builds (pdf-extractstill turns on its default one).- The unused
tracing-futuresdependency (every build compiled it) and the
unusedtracing-actixone from thefull-tracingfeature. - JSON logs come from
tracing-subscriber's own JSON format instead of the
separatejson-subscribercrate. - The
playwrightfeature no longer listsrustwright-coreitself;rustwright
already brings it without Python. - HTTPS uses rustls with the
ringcrypto provider for every client, so the
aws-lc-sysC library is no longer compiled. A program that builds its own
reqwest client next to this crate callsseleniumbase_rs::install_tls_provider()
first. - reqwest no longer builds its
blockingclient: ending reused sessions at
exit uses the async client on a small runtime of its own. thirtyfouris built without itscomponentderive macros and its own
drivermanager(this crate downloads drivers itself), which also removes its
olderzipanddirs.zipis built with deflate only (the format of driver downloads and the
bundled extensions) instead of every format; zstd (a C library), bzip2, lzma,
xz, ppmd and AES no longer compile.
Fixed
- A WebDriver URL with a path and no trailing slash (a Grid's
http://hub:4444/wd/hub, or tauri-plugin-sbrs-automation's
http://127.0.0.1:4445/<token>) lost its last path segment, because the
client joins command paths as relative URLs; the slash is added when
connecting.
Changed
-
The generated browser identity claims Chrome 154, 155 or 156 (was 153 to
155), and its high-entropy Client Hints name a real build per major
(stealth::randomize::KNOWN_FULL_VERSIONS: 155.0.8059.40 measured on macOS
27.0.1 bytests/client_hints_chrome.rs, 154.0.8037.100 and 156.0.8078.35 from
Google's version history) instead ofmajor.0.0.0. Macs claim macOS 15.8.1,
26.7.1, 27.0.0 or 27.0.1; iPhones may claim Safari 26.0 with the frozen
iPhone OS 18_6(Safari 17.7 is gone). The Chrome presets, the--mobile
user agent and the examples claim Chrome 156 (PRESET_CHROMIUM_MAJOR), the
Android ones in Chrome's frozenLinux; Android 10; Kform, and the iPhone
preset is Safari 26.0. Seeds map to other identities than before. -
A fingerprint without Client Hints (the presets) gets its brand list, decoy
brand and full versions fromchromium_hints(major)instead of a fixed
Not(A:Brand24, the Client Hints platform name (Windows, notWin32), and
afullVersionList. -
The
sbrsbanner reads SeleniumBaseRust (figlet small font, 68 columns), and
sbrs --helpandsbrs-mcp --helpsay SeleniumBaseRust. -
The tests' leftover-process checks (Edge, geckodriver, the MCP stdio servers)
list processes withsysinfo(a dev-dependency) instead ofpgrepand
kill -0, so they run on Windows too instead of being skipped there. -
Human-paced input draws its bell-curve values (
stealth::humanize::Rng::gaussian,
used bystealth::behavior) fromrand_distr'sStandardNormalinstead of a
hand-written Box-Muller transform. The distribution is the same, but a seeded
Humanizernow plans different paths and timings than before for the same
seed.humanize::Rngimplementsrand::TryRng(sorand::Rng), and
rand_distris a new dependency.
Added
-
sbrs devtoolslaunches Chrome with its DevTools endpoint open (--port,
default 9222), prints the endpoint and configs for Google's
chrome-devtools-mcpand Microsoft's Playwright MCP (--jsonfor one line of
JSON), and runs until Ctrl-C, which closes the browser. The Pure CDP MCP server
hasget_devtools_endpoint, andBrowser::devtools_endpoint()and
LaunchOptionsBuilder::debugging_portdo the same from Rust. See
docs/tutorials/devtools_mcp.md, which also covers Firefox's and Safari's MCP
servers. -
.github/workflows/release.ymlbuildssbrsandsbrs-mcpfor five targets
on a version tag and attaches the archives, with completions and Warp
workflows, to the release;[package.metadata.binstall]pointscargo binstallat them. Not run yet (GitHub Actions is locked on the account). -
Feature
ocr(off by default):ocr::Ocrreads the text a page shows from
its screenshot (read_page, for aBaseCaseor ansb_cdp::Page) or from PNG
bytes (text_in_png), with ocrs, pure
Rust. Its two models (about 12 MB) are downloaded into the cache folder on
first use and checked against pinned SHA-256 hashes;SB_OCR_MODELSnames a
folder of your own copies instead. -
Browser plugins for the Pure CDP engine (feature
plugins, off by default;
ADR 004 phase 2).LaunchOptionsBuilder::pluginstakes aPluginSetfrom the
plugin API crate
seleniumbase-rs-plugin,
re-exported asseleniumbase_rs::plugin_api.Browser::launchchecks the set,
letsbefore_launchchange the arguments, preferences, extensions, proxy and
headless mode, and callson_browser; every tab the library attaches to gets
the plugins' packages andon_page_created;Browser::close(or the last
drop) callson_close.Browser::connect_with_pluginsdoes the same for a
running browser. A plugin that refuses or fails stops the launch or the tab
with the newSeleniumBaseError::Plugin. Guide:docs/tutorials/plugins.md. -
LaunchOptionsBuilder::extensionloads an unpacked extension over the
protocol (Extensions.loadUnpacked, which branded Chrome 137 and later need
instead of--load-extension), andLaunchOptionsBuilder::preferencemerges
a preference into the profile'sDefault/Preferencesbefore the browser
starts. -
Browser::launch_mocked(featuretest-util) runs the launch steps, plugins
included, against aMockCtrl, whichMockCtrl::newnow creates for a test
to script first. -
Feature
tokio-console(off by default):sbrs,sbrs-mcpand programs that
use the crate's logging serve tokio-console
for watching async tasks. Build withRUSTFLAGS="--cfg tokio_unstable".