Module selector

Module selector 

Source
Expand description

Cached CSS selector helpers.

HTML-heavy crawls often reuse the same selectors across thousands of pages. This module keeps compiled selectors cached so repeated parsing work stays low.

Structs§

SelectorList
A Scrapy-like selection result list.
SelectorNode
A node selected from an HTML document using the builtin CSS selector API.

Functions§

get_cached_selector
Returns a compiled selector from the cache, compiling it on first use.
prewarm_cache
Pre-warms the selector cache with a small set of common selectors.