diff --git a/app/beauty_main.py b/app/beauty_main.py index b54aa0d..1d82c1e 100644 --- a/app/beauty_main.py +++ b/app/beauty_main.py @@ -153,12 +153,15 @@ async def enriched( prescreen_status: str = Query(None), niche: str = Query(None), site_type: str = Query(None), + keyword: str = Query(None), + tld: str = Query(None), page: int = Query(1, ge=1), limit: int = Query(100, ge=1, le=1000), ): total, rows = await get_enriched( min_score=min_score, country=country, prescreen_status=prescreen_status, niche=niche, site_type=site_type, + keyword=keyword, tld=tld, page=page, limit=limit, ) return {"page": page, "limit": limit, "total": total, "results": rows} diff --git a/app/db.py b/app/db.py index d91130c..89cc928 100644 --- a/app/db.py +++ b/app/db.py @@ -334,6 +334,7 @@ async def get_stats(): async def get_enriched(min_score=0, cms=None, country=None, kit_digital=None, ai_only=False, lead_quality=None, prescreen_status=None, niche=None, site_type=None, + keyword=None, tld=None, page=1, limit=100): offset = (page - 1) * limit conditions = ["score >= ?"] @@ -343,7 +344,7 @@ async def get_enriched(min_score=0, cms=None, country=None, kit_digital=None, params.append(cms) if country: conditions.append("ip_country = ?") - params.append(country) + params.append(country.upper()) if kit_digital is not None: conditions.append("kit_digital = ?") params.append(1 if kit_digital else 0) @@ -363,6 +364,14 @@ async def get_enriched(min_score=0, cms=None, country=None, kit_digital=None, if site_type: conditions.append("site_type = ?") params.append(site_type) + if keyword: + kw = f"%{keyword.lower()}%" + conditions.append("(LOWER(domain) LIKE ? OR LOWER(COALESCE(page_title,'')) LIKE ?)") + params.extend([kw, kw]) + if tld: + tld_clean = tld.lower().lstrip(".") + conditions.append("LOWER(domain) LIKE ?") + params.append(f"%.{tld_clean}") where = "WHERE " + " AND ".join(conditions) async with aiosqlite.connect(SQLITE_PATH, timeout=30) as db: db.row_factory = aiosqlite.Row diff --git a/app/static/beauty/index.html b/app/static/beauty/index.html index 95b5484..196ef5a 100644 --- a/app/static/beauty/index.html +++ b/app/static/beauty/index.html @@ -6,19 +6,10 @@ BeautyLeads — Cosmetics B2B Intelligence
- - +
Total Domains
-
Beauty Live
-
HOT Leads
-
WARM Leads
+
Beauty Live
+
HOT Leads
+
WARM Leads
Assessed
In Queue
- +
-
- - - + + - - + - - + - + - +
- -
- - + +
+ + +
+
-
No domains found. Adjust filters or run the validator first.
-
Loading…
+
Loading…
+
+ No domains found. Try adjusting filters, running the Validator, or Pre-screening first. +
- + @@ -207,29 +184,31 @@ input[type=checkbox]{width:14px;height:14px;accent-color:var(--accent);cursor:po - + @@ -237,69 +216,69 @@ input[type=checkbox]{width:14px;height:14px;accent-color:var(--accent);cursor:po
+ + Domain Status CountryNiche Type B2B
+
- - + +
- -
-
- Bulk HTTP validator — checks all domains in the dataset and marks them live/dead/error/parked/redirect. - Run this first, then Pre-screen to classify niches, then use Browse to find beauty leads. -
- -
+ +
+

+ Bulk HTTP validator — checks all domains in the dataset and tags them live / dead / error / parked / redirect. + Run this first, then Pre-screen to classify niches, then Browse to find beauty leads. +

+
Checked
-
Live
-
Dead
-
Error
-
Parked
-
Rate
+
Live
+
Dead
+
Error
+
Parked
+
Rate
- -
- - +
+ Offset: · Skipped: + · TLD filter:
- -
- -
- +
-
+
- + - + - +
-
No B2B assessments yet. Go to Browse → select domains → Assess B2B.
-
Loading…
+
Loading…
+
+ No B2B assessments yet. Go to Browse → select domains → B2B Assess Selected. +
@@ -310,73 +289,80 @@ input[type=checkbox]{width:14px;height:14px;accent-color:var(--accent);cursor:po - +
Categories Portfolio Match Contact