Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
260b92b66a | ||
|
|
f618b6a6a1 | ||
|
|
aa661bd6de |
@@ -9,9 +9,9 @@ edits. **Credentials are always injected — never hardcoded.**
|
||||
## Install
|
||||
|
||||
```
|
||||
aioproxies @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioproxies.git@v0.2.0
|
||||
aioproxies @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioproxies.git@v0.2.1
|
||||
# network helpers (current_ip / reset) need the extra:
|
||||
aioproxies[net] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioproxies.git@v0.2.0
|
||||
aioproxies[net] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioproxies.git@v0.2.1
|
||||
```
|
||||
|
||||
The core has no dependencies. The `net` extra adds `aiohttp` for `current_ip` /
|
||||
@@ -200,6 +200,12 @@ await reset("https://provider/reset-url") # rotate upstream ip
|
||||
|
||||
## Changelog
|
||||
|
||||
### v0.2.1
|
||||
|
||||
- **Legible missing-template-field error:** a `template=` placeholder not supplied to
|
||||
`next(**fields)` now raises a clear `ValueError` naming the field, instead of leaking
|
||||
a bare `KeyError` from `str.format`.
|
||||
|
||||
### v0.2.0
|
||||
|
||||
- **Proxy health for rotating lists:** `burn`/`restore`/`is_burned` (dead `-1` vs
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "aioproxies"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
description = "proxy parsing, formatting, health, and pool management for aiohttp/aioweb, camoufox, and socks5"
|
||||
requires-python = ">=3.10"
|
||||
dependencies = []
|
||||
|
||||
@@ -18,4 +18,4 @@ __all__ = [
|
||||
"to_proxy",
|
||||
]
|
||||
|
||||
__version__ = "0.2.0"
|
||||
__version__ = "0.2.1"
|
||||
|
||||
@@ -123,7 +123,13 @@ class AioProxies:
|
||||
if self._static is not None:
|
||||
return self._static
|
||||
if self.template is not None:
|
||||
return parse(self.template.format(session=self.session_id(), **fields))
|
||||
try:
|
||||
filled = self.template.format(session=self.session_id(), **fields)
|
||||
except (KeyError, IndexError) as exc:
|
||||
raise ValueError(
|
||||
f"template placeholder {exc} not provided; pass it to next(**fields)"
|
||||
) from exc
|
||||
return parse(filled)
|
||||
return self._next_from_list()
|
||||
|
||||
def _next_from_list(self) -> Proxy:
|
||||
|
||||
Reference in New Issue
Block a user