mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-12 01:39:25 +02:00
debug: Add proxy initialization logs to verify proxy loading
This commit is contained in:
1 parent
8080a97e25
commit
df2191cdbd
2 files changed
+8
No files matched your search
@@ -40,6 +40,9 @@ AMAZON_PROXY_LIST = [
|
||||
if (parts := proxy.split(":")) and len(parts) == 4
|
||||
]
|
||||
|
||||
# Log proxy initialization at startup
|
||||
logger.info(f"Amazon proxies initialized: {len(AMAZON_PROXY_LIST)} proxies available")
|
||||
|
||||
def _get_amazon_proxy() -> str | None:
|
||||
"""Get a random proxy for Amazon requests from the rotating pool"""
|
||||
if AMAZON_PROXY_LIST:
|
||||
@@ -48,6 +51,7 @@ def _get_amazon_proxy() -> str | None:
|
||||
ip_port = proxy.split("@")[1] if "@" in proxy else proxy
|
||||
logger.info(f"Using proxy: {ip_port}")
|
||||
return proxy
|
||||
logger.warning("No Amazon proxies available!")
|
||||
return None
|
||||
|
||||
# Constants
|
||||
|
||||
@@ -34,6 +34,9 @@ AMAZON_PROXY_LIST = [
|
||||
if (parts := proxy.split(":")) and len(parts) == 4
|
||||
]
|
||||
|
||||
# Log proxy initialization at startup
|
||||
logger.info(f"Amazon proxies initialized: {len(AMAZON_PROXY_LIST)} proxies available")
|
||||
|
||||
def _get_amazon_proxy() -> str | None:
|
||||
"""Get a random proxy for Amazon requests from the rotating pool"""
|
||||
if AMAZON_PROXY_LIST:
|
||||
@@ -42,6 +45,7 @@ def _get_amazon_proxy() -> str | None:
|
||||
ip_port = proxy.split("@")[1] if "@" in proxy else proxy
|
||||
logger.info(f"Using proxy: {ip_port}")
|
||||
return proxy
|
||||
logger.warning("No Amazon proxies available!")
|
||||
return None
|
||||
|
||||
# Nombre de tentatives pour le scraping
|
||||
|
||||
Reference in new issue
Block a user