From 267fdd0d391f7cafae5a39aaedf89f44fa27f1e4 Mon Sep 17 00:00:00 2001 From: Yves Gugger Date: Sat, 13 Dec 2025 15:52:41 +0100 Subject: [PATCH] Fix all Python indentation errors --- backend/app/services/auction_scraper.py | 54 ++++++++++++------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/backend/app/services/auction_scraper.py b/backend/app/services/auction_scraper.py index 7f4fc5d..8e8e12f 100644 --- a/backend/app/services/auction_scraper.py +++ b/backend/app/services/auction_scraper.py @@ -567,24 +567,24 @@ class AuctionScraperService: href = link_el["href"] if link_el else None if href and href.startswith("/"): href = f"https://park.io{href}" - - auction_data = { - "domain": domain, - "tld": tld, - "platform": platform, + + auction_data = { + "domain": domain, + "tld": tld, + "platform": platform, "auction_url": href or "https://park.io/auctions", "current_bid": current_bid, "currency": currency, - "num_bids": num_bids, + "num_bids": num_bids, "end_time": end_time, "scrape_source": "park.io:auctions", - } - - status = await self._store_auction(db, auction_data) + } + + status = await self._store_auction(db, auction_data) if status == "skipped": continue - result["found"] += 1 - result[status] += 1 + result["found"] += 1 + result[status] += 1 await db.commit() @@ -660,31 +660,31 @@ class AuctionScraperService: time_left_raw = cells[6].get_text(" ", strip=True) delta = self._parse_timeleft(time_left_raw) if not delta: - continue + continue end_time = now + delta href = domain_link.get("href") if domain_link else None if href and href.startswith("/"): href = f"https://www.sav.com{href}" - - auction_data = { - "domain": domain, + + auction_data = { + "domain": domain, "tld": tld, - "platform": platform, + "platform": platform, "auction_url": href or "https://www.sav.com/domains/auctions", "current_bid": current_bid, "currency": currency, "num_bids": num_bids, "end_time": end_time, "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": continue - result["found"] += 1 - result[status] += 1 - + result["found"] += 1 + result[status] += 1 + await asyncio.sleep(1) await db.commit() @@ -777,7 +777,7 @@ class AuctionScraperService: results["total_found"] += r.get("found", 0) results["total_new"] += r.get("new", 0) results["total_updated"] += r.get("updated", 0) - except Exception as e: + except Exception as e: results["errors"].append(f"{platform_name}: {str(e)}") # TIER 3: Playwright (opt-in) @@ -830,10 +830,10 @@ class AuctionScraperService: result["found"] = len(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) if status == "skipped": - continue + continue result[status] += 1 await db.commit() @@ -873,10 +873,10 @@ class AuctionScraperService: result["found"] = len(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) if status == "skipped": - continue + continue result[status] += 1 await db.commit()