mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-24 15:48:11 +02:00
feat: Implement comprehensive search configurations for discount stores and add Gifi-specific search and analysis tools.
This commit is contained in:
1 parent
63073d03b5
commit
c159036583
22 files changed
+19849
-14
No files matched your search
@@ -0,0 +1,24 @@
|
||||
"""
|
||||
Analyze Gifi HTML to find correct selectors
|
||||
"""
|
||||
with open("/app/debug_dumps/gifi_full.html", "r", encoding="utf-8") as f:
|
||||
html = f.read()
|
||||
|
||||
# Find product-related divs
|
||||
import re
|
||||
matches = re.findall(r'<div[^>]*class="[^"]*"[^>]*>.*?</div>', html[:50000], re.DOTALL)
|
||||
|
||||
print(f"Total HTML size: {len(html)} bytes")
|
||||
|
||||
# Search for price patterns
|
||||
price_patterns = re.findall(r'50[.,]00\s*€', html[:50000])
|
||||
print(f"\nFound {len(price_patterns)} instances of '50,00 €'")
|
||||
|
||||
# Find all class names containing specific keywords
|
||||
for keyword in ['product', 'article', 'item', 'card']:
|
||||
classes = re.findall(rf'class="([^"]*{keyword}[^"]*)"', html[:100000], re.IGNORECASE)
|
||||
unique_classes = set(classes)
|
||||
if unique_classes:
|
||||
print(f"\nClasses containing '{keyword}':")
|
||||
for cls in sorted(unique_classes):
|
||||
print(f" - {cls}")
|
||||
Reference in new issue
Block a user