Fix all Python indentation errors
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled

This commit is contained in:
2025-12-13 15:52:41 +01:00
parent 9f3539ae09
commit 267fdd0d39

View File

@ -567,24 +567,24 @@ class AuctionScraperService:
href = link_el["href"] if link_el else None href = link_el["href"] if link_el else None
if href and href.startswith("/"): if href and href.startswith("/"):
href = f"https://park.io{href}" href = f"https://park.io{href}"
auction_data = { auction_data = {
"domain": domain, "domain": domain,
"tld": tld, "tld": tld,
"platform": platform, "platform": platform,
"auction_url": href or "https://park.io/auctions", "auction_url": href or "https://park.io/auctions",
"current_bid": current_bid, "current_bid": current_bid,
"currency": currency, "currency": currency,
"num_bids": num_bids, "num_bids": num_bids,
"end_time": end_time, "end_time": end_time,
"scrape_source": "park.io:auctions", "scrape_source": "park.io:auctions",
} }
status = await self._store_auction(db, auction_data) status = await self._store_auction(db, auction_data)
if status == "skipped": if status == "skipped":
continue continue
result["found"] += 1 result["found"] += 1
result[status] += 1 result[status] += 1
await db.commit() await db.commit()
@ -660,31 +660,31 @@ class AuctionScraperService:
time_left_raw = cells[6].get_text(" ", strip=True) time_left_raw = cells[6].get_text(" ", strip=True)
delta = self._parse_timeleft(time_left_raw) delta = self._parse_timeleft(time_left_raw)
if not delta: if not delta:
continue continue
end_time = now + delta end_time = now + delta
href = domain_link.get("href") if domain_link else None href = domain_link.get("href") if domain_link else None
if href and href.startswith("/"): if href and href.startswith("/"):
href = f"https://www.sav.com{href}" href = f"https://www.sav.com{href}"
auction_data = { auction_data = {
"domain": domain, "domain": domain,
"tld": tld, "tld": tld,
"platform": platform, "platform": platform,
"auction_url": href or "https://www.sav.com/domains/auctions", "auction_url": href or "https://www.sav.com/domains/auctions",
"current_bid": current_bid, "current_bid": current_bid,
"currency": currency, "currency": currency,
"num_bids": num_bids, "num_bids": num_bids,
"end_time": end_time, "end_time": end_time,
"scrape_source": f"sav:load_domains_ajax:{page}", "scrape_source": f"sav:load_domains_ajax:{page}",
} }
status = await self._store_auction(db, auction_data) status = await self._store_auction(db, auction_data)
if status == "skipped": if status == "skipped":
continue continue
result["found"] += 1 result["found"] += 1
result[status] += 1 result[status] += 1
await asyncio.sleep(1) await asyncio.sleep(1)
await db.commit() await db.commit()
@ -777,7 +777,7 @@ class AuctionScraperService:
results["total_found"] += r.get("found", 0) results["total_found"] += r.get("found", 0)
results["total_new"] += r.get("new", 0) results["total_new"] += r.get("new", 0)
results["total_updated"] += r.get("updated", 0) results["total_updated"] += r.get("updated", 0)
except Exception as e: except Exception as e:
results["errors"].append(f"{platform_name}: {str(e)}") results["errors"].append(f"{platform_name}: {str(e)}")
# TIER 3: Playwright (opt-in) # TIER 3: Playwright (opt-in)
@ -830,10 +830,10 @@ class AuctionScraperService:
result["found"] = len(auctions) result["found"] = len(auctions)
for dc_auction in auctions: for dc_auction in auctions:
auction_data = dropcatch_client.transform_to_pounce_format(dc_auction) auction_data = dropcatch_client.transform_to_pounce_format(dc_auction)
status = await self._store_auction(db, auction_data) status = await self._store_auction(db, auction_data)
if status == "skipped": if status == "skipped":
continue continue
result[status] += 1 result[status] += 1
await db.commit() await db.commit()
@ -873,10 +873,10 @@ class AuctionScraperService:
result["found"] = len(listings) result["found"] = len(listings)
for sedo_listing in listings: for sedo_listing in listings:
auction_data = sedo_client.transform_to_pounce_format(sedo_listing) auction_data = sedo_client.transform_to_pounce_format(sedo_listing)
status = await self._store_auction(db, auction_data) status = await self._store_auction(db, auction_data)
if status == "skipped": if status == "skipped":
continue continue
result[status] += 1 result[status] += 1
await db.commit() await db.commit()