MCPcopy
hub / github.com/guelfoweb/knockpy / pick_user_agent

Function pick_user_agent

knockpy/engine/runtime.py:68–71  ·  view source on GitHub ↗
(useragent: Optional[str])

Source from the content-addressed store, hash-verified

66
67
68def pick_user_agent(useragent: Optional[str]) -> str:
69 if useragent and useragent.strip().lower() != "random":
70 return useragent.strip()
71 return random.choice(USER_AGENTS)
72
73
74def _www_fallback_domain(domain: str) -> Optional[str]:

Callers 4

mainFunction · 0.85
__init__Method · 0.85
__init__Method · 0.85
_run_asyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected