(self)
| 51 | *, |
| 52 | settings: Settings | None = None, |
| 53 | http_client: FingerprintHttpClient | None = None, |
| 54 | ) -> None: |
| 55 | self.settings = settings or get_settings() |
| 56 | self.http_client = http_client or FingerprintHttpClient(self.settings) |
| 57 | self.cache_dir = self.settings.data_dir / "tdc_cache" |
| 58 | self.runner_path = PROJECT_ROOT / "app" / "services" / "tdc_vm_runner.cjs" |
| 59 | |
| 60 | def status_payload(self) -> dict[str, Any]: |
| 61 | return { |
| 62 | "node": self.settings.tencent_captcha_node, |
| 63 | "runner": str(self.runner_path), |
| 64 | "cache_dir": str(self.cache_dir), |
| 65 | } |
| 66 | |
| 67 | def collect_for_challenge( |
| 68 | self, |
| 69 | account: AccountRecord, |
| 70 | raw_challenge: dict[str, Any], |
| 71 | ) -> TdcCollectResult: |
| 72 | tdc_path = self.extract_tdc_path(raw_challenge) |
| 73 | if not tdc_path: |
nothing calls this directly
no test coverage detected