MCPcopy Create free account
hub / github.com/Boris-code/feapder / get

Function get

feapder/network/user_agent.py:1058–1066  ·  view source on GitHub ↗
(ua_type: str = None)

Source from the content-addressed store, hash-verified

1056
1057
1058def get(ua_type: str = None):
1059 if not ua_type:
1060 ua_type = random.choice(list(USER_AGENTS.keys()))
1061 elif ua_type not in USER_AGENTS:
1062 raise ValueError(
1063 "ua_type error, expect one of {}".format(list(USER_AGENTS.keys()))
1064 )
1065
1066 return random.choice(USER_AGENTS[ua_type])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected