MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / filter_func

Method filter_func

botasaurus/links.py:88–91  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

86 @filter_decorator
87 def has_exactly_n_segments(n):
88 def filter_func(url):
89 path = urlparse(url).path.strip("/")
90 segments = path.split("/") if path else []
91 return len(segments) == n
92
93 return filter_func
94

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected