(country: str, proxy: str, ttl: int = BAD_PROXY_TTL)
| 611 | |
| 612 | |
| 613 | def mark_proxy_bad(country: str, proxy: str, ttl: int = BAD_PROXY_TTL) -> None: |
| 614 | if not proxy: |
| 615 | return |
| 616 | state = load_proxy_state() |
| 617 | key = country.upper() |
| 618 | bucket = state.setdefault(key, {}) |
| 619 | bucket[proxy] = int(time.time()) + ttl |
| 620 | save_proxy_state(state) |
| 621 | |
| 622 | |
| 623 | def mark_proxy_good(country: str, proxy: str) -> None: |
no test coverage detected