Merge branch 'origin/antigravity' into antigravity

Resolved conflict in browserless_service.py by merging Amazon interstitial selectors.
Combined local robust selectors with remote additions for maximum coverage.
This commit is contained in:
Michael committed 2025-12-02 09:37:31 +01:00
commit 86aae8f628
6 files changed
+94 -12

No files matched your search

+4
View File
@@ -53,8 +53,12 @@ POPUP_SELECTORS = [
# Amazon Interstitials (Soft blocks)
"button:has-text('Continuer les achats')",
"span:has-text('Continuer les achats')",
"a:has-text('Continuer les achats')",
"input[value='Continuer les achats']",
"input[value='Continue shopping']",
"span.a-button-inner > input.a-button-input[type='submit']",
"form:has-text('Continuer les achats') input[type='submit']",
"[aria-labelledby='continue-shopping-label']",
]
+12
View File
@@ -127,6 +127,18 @@ async def process_item_check(item_id: int):
if not screenshot_path:
raise Exception("Failed to capture screenshot")
# Update the main item screenshot for the UI
try:
import shutil
import os
dest_path = f"/app/screenshots/item_{item_id}.png"
# Ensure directory exists
os.makedirs(os.path.dirname(dest_path), exist_ok=True)
shutil.copy2(screenshot_path, dest_path)
logger.info(f"Updated main screenshot for item {item_id}")
except Exception as e:
logger.error(f"Failed to update main screenshot: {e}")
if not (ai_result := await AIService.analyze_image(screenshot_path, page_text=page_text)):
raise Exception("AI analysis failed")
+4
View File
@@ -422,6 +422,10 @@ def seed_default_sites(db: Session) -> int:
site = existing_sites[clean_domain]
changed = False
for key, value in site_data.items():
# Skip updating user-configurable fields to preserve preferences
if key in ["is_active", "priority"]:
continue
if getattr(site, key) != value:
setattr(site, key, value)
changed = True