pub struct SpiderBrowserConfig {
pub api_key: String,
pub wss_url: String,
pub stealth: bool,
pub browser: Option<String>,
pub country: Option<String>,
pub extra_params: Option<Vec<(String, String)>>,
}spider_cloud and chrome only.Expand description
Configuration for Spider Browser Cloud.
Connects to a remote Chromium instance via CDP over WebSocket at
wss://browser.spider.cloud/v1/browser. Authentication is via
?token=API_KEY query parameter.
Optional query parameters: stealth, browser, country.
Fields§
§api_key: StringAPI key / secret. Sign up at https://spider.cloud to get one.
wss_url: StringWebSocket base URL (default: wss://browser.spider.cloud/v1/browser).
stealth: boolEnable stealth mode (anti-fingerprinting). Sent as stealth=true query param.
browser: Option<String>Browser type to request (e.g. "chrome", "firefox"). Sent as browser=<value>.
country: Option<String>Country code for geo-targeting (e.g. "us", "gb"). Sent as country=<value>.
extra_params: Option<Vec<(String, String)>>Extra query parameters appended to the WSS URL.
Implementations§
Source§impl SpiderBrowserConfig
impl SpiderBrowserConfig
Sourcepub fn with_wss_url(self, url: impl Into<String>) -> Self
pub fn with_wss_url(self, url: impl Into<String>) -> Self
Set a custom WSS base URL.
Sourcepub fn with_stealth(self, stealth: bool) -> Self
pub fn with_stealth(self, stealth: bool) -> Self
Enable or disable stealth mode.
Sourcepub fn with_browser(self, browser: impl Into<String>) -> Self
pub fn with_browser(self, browser: impl Into<String>) -> Self
Set the browser type to request.
Sourcepub fn with_country(self, country: impl Into<String>) -> Self
pub fn with_country(self, country: impl Into<String>) -> Self
Set the country code for geo-targeting.
Sourcepub fn with_extra_params(self, params: Vec<(String, String)>) -> Self
pub fn with_extra_params(self, params: Vec<(String, String)>) -> Self
Add extra query parameters.
Sourcepub fn connection_url(&self) -> String
pub fn connection_url(&self) -> String
Build the full WSS connection URL with authentication and options.
Returns a URL like:
wss://browser.spider.cloud/v1/browser?token=KEY&stealth=true&country=us
Trait Implementations§
Source§impl Clone for SpiderBrowserConfig
impl Clone for SpiderBrowserConfig
Source§fn clone(&self) -> SpiderBrowserConfig
fn clone(&self) -> SpiderBrowserConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SpiderBrowserConfig
impl Debug for SpiderBrowserConfig
Source§impl Default for SpiderBrowserConfig
impl Default for SpiderBrowserConfig
Source§impl<'de> Deserialize<'de> for SpiderBrowserConfig
impl<'de> Deserialize<'de> for SpiderBrowserConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SpiderBrowserConfig
impl PartialEq for SpiderBrowserConfig
Source§impl Serialize for SpiderBrowserConfig
impl Serialize for SpiderBrowserConfig
impl Eq for SpiderBrowserConfig
impl StructuralPartialEq for SpiderBrowserConfig
Auto Trait Implementations§
impl Freeze for SpiderBrowserConfig
impl RefUnwindSafe for SpiderBrowserConfig
impl Send for SpiderBrowserConfig
impl Sync for SpiderBrowserConfig
impl Unpin for SpiderBrowserConfig
impl UnsafeUnpin for SpiderBrowserConfig
impl UnwindSafe for SpiderBrowserConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more