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§
- Selector
List - A Scrapy-like selection result list.
- Selector
Node - 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.