获取当前请求链路绑定的浏览器指纹快照。
(self)
| 105 | self._request_fingerprint_ctx.set(dict(fingerprint) if fingerprint else None) |
| 106 | |
| 107 | def get_request_fingerprint(self) -> Optional[Dict[str, Any]]: |
| 108 | """获取当前请求链路绑定的浏览器指纹快照。""" |
| 109 | fingerprint = self._request_fingerprint_ctx.get() |
| 110 | if not isinstance(fingerprint, dict) or not fingerprint: |
| 111 | return None |
| 112 | return dict(fingerprint) |
| 113 | |
| 114 | def clear_request_fingerprint(self): |
| 115 | """清理请求链路绑定的浏览器指纹。""" |
no outgoing calls
no test coverage detected