ov.operate.strategies#
Journey-strategy helpers – intent shaping for the three strategies (§2.3).
The three strategies reuse the same primitives, varying only the intent written
to the journal: crawl-and-map (enumerate), goal-pursuit (advance), and
guided-replay (replay). These helpers keep that vocabulary in one place and
provide the deterministic target-selection a model-free driver needs.
Module Attributes
Roles treated as navigable for crawl-and-map. |
Functions
|
Resolve |
|
True when |
|
Return affordances suitable for breadth-first crawl (links/tabs/menuitems). |
- ov.operate.strategies.NAV_ROLES = frozenset({'a', 'link', 'menuitem', 'tab'})#
Roles treated as navigable for crawl-and-map.
- ov.operate.strategies.absolutize(href, base_url)[source]#
Resolve
hrefagainstbase_url(drops fragments).- Return type:
- ov.operate.strategies.is_same_origin(url, base_url)[source]#
True when
urlshares scheme+host(+port) withbase_url.>>> is_same_origin("https://x.com/a", "https://x.com/b") True >>> is_same_origin("https://y.com/a", "https://x.com/b") False
- Return type:
Return affordances suitable for breadth-first crawl (links/tabs/menuitems).
- Return type: