Commit Graph
66 Commits
Author SHA1 Message Date
Michael 3c4094d4de revert: Back to working Amazon configuration from ee8a146 - simpler is better 2025-11-29 00:39:25 +01:00
Michael c88f52c136 fix: Add ref=nb_sb_noss parameter to Amazon URLs as in working version + increase retry delays 2025-11-29 00:34:09 +01:00
Michael eb48c4aa33 feat: Add direct search service for e-commerce scraping via Browserless with bot evasion. 2025-11-29 00:30:12 +01:00
Michael 34dc9f6f40 fix: Apply working Amazon anti-blocking strategy from scraper_service - warmup + no image blocking 2025-11-29 00:22:52 +01:00
Michael 46442d5e0c Merge: resolved conflicts in direct_search_service.py 2025-11-29 00:12:28 +01:00
Michael 69aefdbac3 Fix: Resolve merge conflict in direct_search_service.py by confirming random import 2025-11-29 00:06:51 +01:00
Michael 0d102b73d0 feat: Implement direct e-commerce search service using Playwright/Browserless with anti-bot techniques like User-Agent rotation, proxy support, and stealth JS, particularly for Amazon. 2025-11-28 23:59:50 +01:00
Michael b75ad636dd feat: add product search orchestration service with direct, light scraper, and browserless methods 2025-11-28 23:57:51 +01:00
Michael 3caea8316b feat: Add Playwright-based web scraping service with advanced stealth techniques and proxy support, including Amazon-specific logic. 2025-11-28 23:53:45 +01:00
Michael f187e6cb9d feat: Implement direct e-commerce search service with advanced anti-bot stealth using Playwright/Browserless. 2025-11-24 13:10:40 +01:00
Michael ba28f0b711 feat: implement direct e-commerce search service with site-specific configurations using Playwright. 2025-11-24 13:05:21 +01:00
Michael ee8a14668c feat: Implement direct e-commerce search service using Playwright/Browserless to scrape product information from various configured retail websites. 2025-11-24 13:04:03 +01:00
Michael 97039484fa feat: add direct search service for e-commerce sites using Playwright/Browserless with predefined site configurations. 2025-11-24 13:03:47 +01:00
Michael 8053955097 feat: add direct e-commerce search service using Playwright/Browserless with predefined site configurations 2025-11-24 13:01:47 +01:00
Claude 698dbaa029 feat: Add dedicated Amazon extraction without generic filters
- Create _find_amazon_product_links() function for Amazon-specific extraction
- Use ASIN-based deduplication for Amazon products
- Bypass all generic filters (_is_non_product_url, _is_navigation_link) for Amazon
- Multiple fallback methods for Amazon product detection:
  - data-component-type="s-product-image"
  - .s-result-item links
  - All /dp/ links in main content
- Clean Amazon URLs by removing tracking parameters
- Extract title from img alt as fallback for Amazon

This separates Amazon's extraction logic from the generic e-commerce filters
that were designed for French sites like Cdiscount, Fnac, etc.
2025-11-24 08:39:11 +00:00
Claude 10ec21f4f5 feat: Add proxy support for Amazon scraping
- Add AMAZON_PROXY_URL and AMAZON_PROXY_LIST environment variables
- Support single proxy or rotating proxy list (comma-separated)
- Apply proxy only for Amazon requests
- Log proxy usage (hiding credentials)
2025-11-24 08:30:55 +00:00
Claude e62ff09667 feat: Enhanced stealth JavaScript with comprehensive anti-detection
- Multiple webdriver override techniques (property, prototype, getAttribute)
- Realistic navigator.plugins and mimeTypes
- Delete 20+ automation-related window properties (CDP, Selenium, etc.)
- Full chrome object emulation with realistic properties
- WebGL and WebGL2 fingerprinting protection
- Canvas fingerprinting protection with noise injection
- AudioContext fingerprinting protection
- Screen properties spoofing
- iframe contentWindow webdriver hiding
- Battery API mocking
- Hide Playwright/Puppeteer specific objects
2025-11-24 08:25:23 +00:00
Claude 3bae422c38 fix: Add stealth JavaScript injection to bypass Amazon bot detection
- Add STEALTH_JS constant with scripts to hide automation fingerprints
- Override navigator.webdriver, plugins, languages, permissions
- Fake WebGL vendor/renderer and hardware concurrency
- Inject stealth script via context.add_init_script() for Amazon pages
- Add bypass_csp=True to allow script injection
- Don't block images for Amazon to avoid detection triggers
- Apply stealth to both direct_search_service and scraper_service
2025-11-24 08:07:49 +00:00
Claude e62117f9b9 feat: Add per-site debug toggle for HTML dump control
- Add debug_enabled field to SearchSite model
- Update schemas and API routes to allow debug toggle
- Add debug toggle button on site cards in Admin UI
- Only dump HTML when debug is enabled for the site (except for critical errors like Amazon blocking)
- Add API endpoints to list/delete debug files per site domain
- Add button to clear debug files for individual sites
2025-11-24 08:01:39 +00:00
Claude 7243bcfaa1 fix: Improve Amazon scraping to avoid 503 blocking errors
- Add User-Agent rotation pool with modern Chrome/Firefox/Edge versions
- Implement Amazon-specific blocking detection ("Toutes nos excuses", etc.)
- Add exponential backoff with jitter for Amazon retries (up to 4 retries)
- Include Sec-Fetch-* headers and proper Referer to appear more legitimate
- Simulate human behavior (mouse movements, random scrolling)
- Add random delays between requests to avoid rate limiting
- Properly differentiate Amazon 503 (blocking) from true product unavailability
- Apply same protections to both search and product scraping services
2025-11-24 07:45:09 +00:00
Claude a8ff8217b3 fix: Use absolute paths for debug_dumps directory
- Changed debug_dumps path from relative to absolute (/app/debug_dumps)
- Updated direct_search_service.py to use consistent absolute path
- Updated debug.py router to use the same absolute path
- Added debug_dumps directory creation in Dockerfile
- Improved _dump_debug_html with safer filename handling
2025-11-24 07:27:45 +00:00
Michael e45290350c feat: implement direct e-commerce search service with Playwright/Browserless and add supporting admin page and debug routes. 2025-11-24 07:18:12 +01:00
Michael df052ae4f7 feat: add direct e-commerce search service via Browserless/Playwright with site-specific configurations. 2025-11-24 00:47:34 +01:00
Michael 95deddaffb feat: implement product search orchestration service with direct, light scraping, and browserless AI extraction strategies. 2025-11-24 00:28:00 +01:00
Michael 4ab859114e feat: Add direct search service for e-commerce sites using Playwright/Browserless and configured selectors. 2025-11-24 00:22:28 +01:00
Michael 18d5f3dbf1 feat: Add notification service with Apprise integration for email, Discord, and Mattermost channels. 2025-11-23 23:47:45 +01:00
Michael f720a7aa17 feat: Implement a new notification service using Apprise for sending notifications via various channels. 2025-11-23 23:42:00 +01:00
Michael 7dfc9e1af3 feat: Add notification service to send messages via Apprise with support for various channels. 2025-11-23 23:36:26 +01:00
Michael 9637d77cef feat: Initialize core application structure with item tracking, price history, and notification channel management. 2025-11-23 23:17:52 +01:00
Michael b5e3b44e5a feat: Implement scheduled item price tracking with AI analysis, core backend services, and a dashboard item management modal. 2025-11-23 22:48:01 +01:00
Michael 38af998a09 feat: add scraper service with URL simplification, Playwright integration, and retry logic for web scraping. 2025-11-23 22:18:11 +01:00
Michael 8afa65f9ee feat: add direct search service for e-commerce sites using Playwright/Browserless with pre-configured French retailers. 2025-11-23 17:37:23 +01:00
Michael 184763b2da feat: Implement product search orchestration service combining direct site search, light scraping, and Browserless/AI fallback. 2025-11-23 16:26:13 +01:00
Michael e551927327 feat: Add direct e-commerce search service using Playwright/Browserless with site-specific configurations. 2025-11-23 16:06:16 +01:00
Michael 9a6ebf6f06 feat: Implement direct product search service using Browserless for e-commerce sites and add a search flow verification script. 2025-11-23 15:45:09 +01:00
Michael 7c8da4a337 feat: Implement dashboard delete confirmation UI, add a text utility, and install frontend dependencies. 2025-11-23 15:18:04 +01:00
Michael 8d124bf0f8 feat: Add initial database migration and UI label component, alongside frontend dependency installation. 2025-11-23 14:37:35 +01:00
Claude 1dd6d4dae1 feat: Add authentication system and admin panel
- Add User model with authentication
- Create JWT-based auth service
- Add login page with admin/admin default credentials
- Create admin panel with user management, settings, and site configuration
- Move settings to admin section (admin only)
- Change search page from multi-site checkboxes to single site selector
- Add logout functionality to layout
- Protect routes with authentication
2025-11-23 09:15:56 +00:00
Claude 5e5f49a5f6 fix: Improve Amazon search reliability and URL validation
Amazon selectors simplified:
- Remove overly restrictive [href*='/ref='] requirement
- Use simpler data-asin and s-result-item selectors
- Wait for [data-component-type='s-search-result']

URL validation improved (_is_non_product_url):
- For Amazon: ONLY accept URLs containing /dp/ or /gp/product/
- Reject Amazon URLs with /ref=cs_ (error page links)
- Reject Amazon redirect URLs without product paths
- Add patterns: /503, /error, /robot, /captcha
- Add French site patterns: /application, /courses

Navigation link filter improvements:
- Add more Amazon error patterns: /ref=nb_, /ref=sr_
- Add /ap/signin, /gp/yourstore, /gp/cart
2025-11-23 09:02:51 +00:00
Claude 0a786b1c49 fix: Improve product selectors and URL filtering
Product selectors improvements:
- E.Leclerc: Target only /fp/ links, exclude promo/promotion URLs
- Auchan: Target only /p/*.html product links
- Carrefour: Target only /p/*.html product links
- Amazon FR/US: Target only /dp/ links with ASIN, exclude logo/nav links

URL filtering improvements (_is_navigation_link):
- Add French site-specific patterns: /application, /courses, /ep-
- Add promo/offers exclusions: /promo/, /offres/, /promotions/
- Add service pages: /magasin, /services/, /recettes
- Add Amazon-specific: /ref=cs_, /logo, /nav_, /gp/help
- Add generic exclusions: /home, /newsletter, /wishlist

These changes ensure only actual product URLs are captured,
not navigation links, app pages, or promotional banners.
2025-11-23 08:43:21 +00:00
Claude d2f95f5508 fix: Correct search URLs for French supermarkets
- E.Leclerc: Fix URL from /cat/recherche~q= to /recherche?q=
  (the old URL was showing promotions instead of search results)
- Auchan: Keep correct URL /recherche?text=
- Carrefour: Keep correct URL /s?q=
- Amazon FR/US: Simplify configuration, remove complex anti-bot
  headers that were causing more issues than helping
- Simplify browserless search function (remove special Amazon handling)
2025-11-23 08:29:28 +00:00
Claude 00d3aa9f1e fix: Improve Amazon search with anti-bot bypass measures
- Add special handling for Amazon (FR and US):
  - Custom User-Agent and HTTP headers mimicking real browser
  - Don't block images (Amazon uses them for bot detection)
  - Extra wait time and scroll for lazy-loaded content
  - Timezone set to Europe/Paris
  - Additional Sec-Fetch-* headers for authenticity
- Update Amazon product selectors with more robust patterns:
  - a.a-link-normal for direct product links
  - [data-asin]:not([data-asin='']) for filtering empty ASINs
  - .s-main-slot targeting main search results
- Add &ref=nb_sb_noss parameter to avoid redirects
2025-11-23 08:15:29 +00:00
Claude 3293b5d58a fix: Improve French price extraction and cookie handling
AI Schema:
- Improve extraction prompt for French e-commerce pages
- Add specific instructions for French price format (comma decimal, space thousands)
- Add French stock status terms (Ajouter au panier, Disponible, etc.)
- Fix price normalization to handle French format:
  - "12,99" -> 12.99
  - "1 234,56" -> 1234.56
  - "1.234,56" -> 1234.56

Scraper Service:
- Add comprehensive cookie/popup selectors for French sites:
  - E.Leclerc, Auchan, Carrefour (OneTrust, Didomi)
  - Cdiscount (#footer_tc_privacy_button_2)
  - Boulanger (.bcom-consent-accept-all)
  - Gifi, Centrakor (Magento cookie buttons)
  - PrestaShop sites (Stokomani, B&M)
- Add common CMP platform selectors
- Add French text-based selectors for cookie acceptance
2025-11-23 08:12:43 +00:00
Claude ee40ae68fc fix: Improve French e-commerce sites configuration
- Change default currency from USD to EUR for all French sites
- Update AI extraction prompt to use EUR by default
- Fix E.Leclerc search URL pattern
- Improve product selectors for Auchan, Carrefour, Amazon France
- Add Amazon France language parameter for better results
- Enhance cookie acceptance with site-specific selectors:
  - Amazon (#sp-cc-accept)
  - E.Leclerc (#onetrust-accept-btn-handler)
  - Auchan (#popin_tc_privacy_button_2, #didomi-notice-agree-button)
  - Carrefour (#onetrust-accept-btn-handler)
  - Cdiscount (#footer_tc_privacy_button_2)
  - And more CMP platforms (Didomi, OneTrust, Tarteaucitron, etc.)
- Improve cookie handling with iframe support and retry logic
2025-11-23 07:54:49 +00:00
Claude e1a9bd2657 feat: Hardcode French e-commerce websites configuration
- Remove ability to add/edit/delete search sites from settings UI
- Configure 16 French e-commerce sites with search URLs:
  - Discount: Gifi, Stokomani, B&M, Centrakor, L'Incroyable, Action, La Foir'Fouille
  - Grandes Surfaces: E.Leclerc, Auchan, Carrefour
  - E-commerce: Amazon France, Cdiscount
  - Électronique: Darty, Boulanger, Fnac
- Add automatic database seeding on application startup
- Add /api/search-sites/seed and /api/search-sites/reset endpoints
- Add cookie consent banner handling for sites that require it
- Simplify Settings page to only show site list with toggle for active state
2025-11-23 07:40:12 +00:00
Claude 7d92549a45 fix: Improve gifi.fr product link detection with .html pattern 2025-11-22 15:59:30 +00:00
Claude d132f991a9 fix: Add /products/ pattern for stokomani.fr 2025-11-22 15:58:18 +00:00
Claude 24fa6087fc fix: Improve product link detection for French e-commerce sites
- Add fallback to generic detection when configured selector fails
- Add many more CSS selectors for French e-commerce platforms (PrestaShop, Magento, WooCommerce)
- Add /produits/ pattern for bmstores.fr
- Improve generic container-based link detection
- Add navigation link filter to exclude non-product links
2025-11-22 15:57:58 +00:00
Claude 826d04331c fix: Improve domain matching and add discover-all endpoint
- Improve domain matching in direct_search_service to handle various formats
- Add /discover-all endpoint to discover search URLs for all sites missing one
- Add constants for magic numbers and fix linting issues
- Better domain cleaning in comparison functions
2025-11-22 15:40:59 +00:00
Claude aad16985d4 fix: Clean up linting issues in search URL discovery
- Move imports to top-level in search_sites router
- Fix line too long issue with input selector
- Define constants for magic numbers (HTTP_OK, MIN_PRODUCTS_TO_MATCH)
- Use 'raise from' pattern for proper exception chaining
2025-11-22 15:31:12 +00:00