mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-16 19:57:55 +02:00
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:
1 parent
43de609773
commit
cd18b47bc0
6 files changed
+309
-25
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user