(text: str)
| 351 | |
| 352 | |
| 353 | def _looks_like_network(text: str) -> bool: |
| 354 | return any(keyword in text for keyword in [ |
| 355 | "connectionerror", |
| 356 | "connection aborted", |
| 357 | "connection reset", |
| 358 | "failed to establish a new connection", |
| 359 | "network", |
| 360 | "网络", |
| 361 | "连接失败", |
| 362 | "连接错误", |
| 363 | ]) |
| 364 | |
| 365 | |
| 366 | def _first_meaningful_line(value: str) -> str: |