Utilities

pagemodel.utils

Low‑level extraction utilities that work directly with lxml elements.

These functions are independent of the page/fragment class system and can be used for quick, one‑off extraction tasks.

Functions:

get_text_content

get_text_content(elm, glue='\n')

Return the full text content of an element, replacing
tags with glue. A deep copy is made to avoid mutating the original tree.