pub struct YidunRequest {
pub website_url: String,
pub website_key: String,
pub proxy: Option<ProxyInfo>,
pub user_agent: Option<String>,
pub yidun_get_lib: Option<String>,
pub yidun_api_server_subdomain: Option<String>,
pub challenge: Option<String>,
pub hcg: Option<String>,
pub hct: Option<i64>,
}Expand description
NetEase Yidun captcha (YidunTask). Setting challenge selects the Enterprise variant.
Fields§
§website_url: StringFull URL of the page with the captcha.
website_key: StringThe siteKey value found on the page.
proxy: Option<ProxyInfo>§user_agent: Option<String>Browser User-Agent (use a current Windows one).
yidun_get_lib: Option<String>Full URL (https://...) of the JS file that loads the captcha. Recommended when
challenge, hcg or hct are present on the site.
yidun_api_server_subdomain: Option<String>Yidun API server subdomain; must differ from c.dun.163.com / c-v6.dun.163.com
and be given without https://. Needed for custom (often Enterprise) servers.
challenge: Option<String>Unique identifier of the current captcha; indicates the Enterprise captcha.
hcg: Option<String>Captcha hash used in the request; obtained together with challenge.
hct: Option<i64>Numeric timestamp used in Enterprise validation.
Implementations§
Source§impl YidunRequest
impl YidunRequest
pub fn new( website_url: impl Into<String>, website_key: impl Into<String>, ) -> Self
pub fn with_proxy(self, proxy: ProxyInfo) -> Self
pub fn with_user_agent(self, value: impl Into<String>) -> Self
pub fn with_yidun_get_lib(self, value: impl Into<String>) -> Self
pub fn with_yidun_api_server_subdomain(self, value: impl Into<String>) -> Self
pub fn with_challenge(self, value: impl Into<String>) -> Self
pub fn with_hcg(self, value: impl Into<String>) -> Self
pub fn with_hct(self, value: i64) -> Self
Trait Implementations§
Source§impl CaptchaRequest for YidunRequest
impl CaptchaRequest for YidunRequest
Source§fn timeouts(&self) -> GetResultTimeouts
fn timeouts(&self) -> GetResultTimeouts
Polling schedule recommended for this captcha type.
Source§impl Clone for YidunRequest
impl Clone for YidunRequest
Source§impl Debug for YidunRequest
impl Debug for YidunRequest
Auto Trait Implementations§
impl Freeze for YidunRequest
impl RefUnwindSafe for YidunRequest
impl Send for YidunRequest
impl Sync for YidunRequest
impl Unpin for YidunRequest
impl UnsafeUnpin for YidunRequest
impl UnwindSafe for YidunRequest
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
Mutably borrows from an owned value. Read more