Skip to main content

content_root

Function content_root 

Source
pub fn content_root(doc: &Html) -> Option<ElementRef<'_>>
Expand description

Pick the element most likely to contain the primary article content.

Heuristic, in priority order: <article>, <main>, [role=main], then the largest <div> by text length, falling back to <body>.