fix detect proxy
This commit is contained in:
@@ -53,7 +53,7 @@ def _patch_camoufox():
|
||||
|
||||
def _patched_ip(proxy_string: str) -> str:
|
||||
global _socks5_real_ip
|
||||
if _socks5_real_ip and "127.0.0.1" in str(proxy_string):
|
||||
if _socks5_real_ip:
|
||||
return _socks5_real_ip
|
||||
return _orig_ip(proxy_string)
|
||||
|
||||
@@ -160,16 +160,7 @@ class BrowserService:
|
||||
reading_time
|
||||
)
|
||||
else:
|
||||
async with AsyncCamoufox(
|
||||
headless=True,
|
||||
geoip=False,
|
||||
humanize=True,
|
||||
locale="ru-RU",
|
||||
exclude_addons=[DefaultAddons.UBO]
|
||||
) as browser:
|
||||
result = await self._browse_page(
|
||||
browser, url, "direct", reading_time
|
||||
)
|
||||
return VisitResult(url=url, success=False, error="No proxy available")
|
||||
|
||||
if proxy:
|
||||
await self.proxy_manager.release_proxy(proxy, result.success)
|
||||
|
||||
Reference in New Issue
Block a user