(method: str)
| 206 | |
| 207 | |
| 208 | def _schedule_captcha_runtime_prepare(method: str) -> bool: |
| 209 | runtime_method = _normalize_runtime_method(method) |
| 210 | task = captcha_runtime_prepare_tasks.get(runtime_method) |
| 211 | if task and not task.done(): |
| 212 | progress_runtime_prepare(runtime_method, "浏览器环境准备任务仍在进行中,请稍候...") |
| 213 | return False |
| 214 | |
| 215 | captcha_runtime_prepare_tasks[runtime_method] = asyncio.create_task( |
| 216 | _prepare_captcha_runtime(runtime_method) |
| 217 | ) |
| 218 | return True |
| 219 | |
| 220 | |
| 221 | def _guess_impersonate_from_user_agent(user_agent: str) -> str: |
no test coverage detected