feat: Add core search configurations for various e-commerce sites, including proxy and user agent management, and introduce initial Amazon scraper service and proxy utilities.

This commit is contained in:
Michael committed 2025-12-24 21:13:22 +01:00
1 parent 43de609773
commit cd18b47bc0
6 files changed
+309 -25

No files matched your search

+8 -1
View File
@@ -352,7 +352,14 @@ class AmazonScraperService:
logger.warning(f"⏳ Attempt {attempt} failed, retrying in {delay}s with new identity...")
await asyncio.sleep(delay)
logger.error(f"❌ All {MAX_RETRY_ATTEMPTS} attempts failed for query: {query}")
if not products and proxies:
logger.warning("⚠️ All proxy attempts failed. Attempting fallback to direct connection...")
products = await cls._try_scrape(query, max_results, None, MAX_RETRY_ATTEMPTS + 1)
if products:
logger.info("✅ Successfully extracted products using direct connection fallback")
return products
logger.error(f"❌ All attempts failed for query: {query}")
return []
@classmethod