MCPcopy Create free account
hub / github.com/microsoft/playwright-python / trim_url

Function trim_url

playwright/_impl/_page.py:1618–1623  ·  view source on GitHub ↗
(param: Union[URLMatchRequest, URLMatchResponse])

Source from the content-addressed store, hash-verified

1616
1617
1618def trim_url(param: Union[URLMatchRequest, URLMatchResponse]) -> Optional[str]:
1619 if isinstance(param, re.Pattern):
1620 return trim_end(param.pattern)
1621 if isinstance(param, str):
1622 return trim_end(param)
1623 return None
1624
1625
1626def trim_end(s: str) -> str:

Callers 2

expect_requestMethod · 0.85
expect_responseMethod · 0.85

Calls 1

trim_endFunction · 0.85

Tested by

no test coverage detected