Struct deviantart::types::scraped_webpage_info::ScrapedWebPageInfo
source · pub struct ScrapedWebPageInfo {
pub config: Config,
pub entities: Option<Entities>,
pub duper_browse: Option<DuperBrowse>,
pub public_session: PublicSession,
pub streams: Option<Streams>,
pub csrf_token: Option<Box<str>>,
pub lu_token: Option<Box<str>>,
pub lu_token2: Option<Box<str>>,
pub unknown: HashMap<String, Value>,
}
Expand description
Info scraped from a deviation url
Fields§
§config: Config
Page config like csrf tokens
entities: Option<Entities>
Deviations extended deviations maybe?
duper_browse: Option<DuperBrowse>
?
public_session: PublicSession
Info about the current session
streams: Option<Streams>
Streams
csrf_token: Option<Box<str>>
Needed for login.
Note that this is a different csrf token from the config struct.
lu_token: Option<Box<str>>
Needed for login.
lu_token2: Option<Box<str>>
Needed for login.
unknown: HashMap<String, Value>
Unknown data
Implementations§
source§impl ScrapedWebPageInfo
impl ScrapedWebPageInfo
sourcepub fn from_html_str(input: &str) -> Result<Self, FromHtmlStrError>
pub fn from_html_str(input: &str) -> Result<Self, FromHtmlStrError>
Parse this from a html string
sourcepub fn is_logged_in(&self) -> bool
pub fn is_logged_in(&self) -> bool
Returns true
if logged in
sourcepub fn get_current_deviation_id(&self) -> Option<&Value>
pub fn get_current_deviation_id(&self) -> Option<&Value>
Get the current deviation’s id
sourcepub fn get_current_deviation(&self) -> Option<&Deviation>
pub fn get_current_deviation(&self) -> Option<&Deviation>
Get the Deviation
for this page.
sourcepub fn get_current_deviation_extended(&self) -> Option<&DeviationExtended>
pub fn get_current_deviation_extended(&self) -> Option<&DeviationExtended>
Get the DeviationExtended
for this page.
sourcepub fn get_deviation_by_id(&self, id: u64) -> Option<&Deviation>
pub fn get_deviation_by_id(&self, id: u64) -> Option<&Deviation>
Get a deviation by id, if it exists
sourcepub fn take_deviation_by_id(&mut self, id: u64) -> Option<Deviation>
pub fn take_deviation_by_id(&mut self, id: u64) -> Option<Deviation>
Take a deviation by id, if it exists
Trait Implementations§
source§impl Debug for ScrapedWebPageInfo
impl Debug for ScrapedWebPageInfo
source§impl<'de> Deserialize<'de> for ScrapedWebPageInfo
impl<'de> Deserialize<'de> for ScrapedWebPageInfo
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ScrapedWebPageInfo
impl RefUnwindSafe for ScrapedWebPageInfo
impl Send for ScrapedWebPageInfo
impl Sync for ScrapedWebPageInfo
impl Unpin for ScrapedWebPageInfo
impl UnwindSafe for ScrapedWebPageInfo
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