Fix a theoretically possible bug when checking for anonymity
This commit is contained in:
+2
-1
@@ -2,7 +2,8 @@
|
||||
|
||||
## 2022-08-20
|
||||
|
||||
- Treat proxy as non-working if status code >= 400
|
||||
- Treat proxy as non-working if status code >= 400.
|
||||
- Fix a theoretically possible bug when checking for anonymity.
|
||||
|
||||
## 2022-08-08
|
||||
|
||||
|
||||
@@ -54,7 +54,10 @@ class Proxy:
|
||||
region = data.get("regionName") or "?"
|
||||
city = data.get("city") or "?"
|
||||
self.geolocation = f"|{country}|{region}|{city}"
|
||||
self.is_anonymous = self.ip != data.get("query")
|
||||
|
||||
query = data.get("query")
|
||||
if query:
|
||||
self.is_anonymous = self.ip != query
|
||||
|
||||
def __eq__(self, other: object) -> bool:
|
||||
if not isinstance(other, Proxy):
|
||||
|
||||
Reference in New Issue
Block a user