(ua_type: str = None)
| 1056 | |
| 1057 | |
| 1058 | def 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]) |
nothing calls this directly
no outgoing calls
no test coverage detected