Skip to main content

extract_embedded_snapshot

Function extract_embedded_snapshot 

Source
pub fn extract_embedded_snapshot(
    html: &str,
    id: &str,
) -> Option<Result<Snapshot>>
Expand description

Pull the JSON out of <script type="application/json" id="{id}">…</script> and parse it into a Snapshot. Returns None if the tag is absent or holds null.