This commit is contained in:
monosans
2023-01-15 00:22:17 +03:00
parent cea51b2d71
commit 7298a5594f
3 changed files with 83 additions and 75 deletions
+3 -5
View File
@@ -20,7 +20,7 @@ class Proxy:
*,
sem: asyncio.Semaphore,
cookie_jar: AbstractCookieJar,
proto: str,
proto: ProxyType,
timeout: ClientTimeout,
) -> None:
async with sem:
@@ -40,10 +40,8 @@ class Proxy:
data["country"], data["regionName"], data["city"]
)
def get_connector(self, proto: str) -> ProxyConnector:
return ProxyConnector(
proxy_type=ProxyType[proto], host=self.host, port=self.port
)
def get_connector(self, proto: ProxyType) -> ProxyConnector:
return ProxyConnector(proxy_type=proto, host=self.host, port=self.port)
def as_str(self, include_geolocation: bool) -> str:
if include_geolocation: