← Back to Projects
Stealth Web Scraper & Listing Viewer
Tech: Python, Playwright, BeautifulSoup, pandas, Flask
Overview
Shopping for used motorcycles across multiple marketplaces meant dealing with clunky search filters, duplicate reposts, and sites that block standard HTTP clients. I built a Python scraper and local Flask viewer to collect listings automatically, clean messy seller text into structured columns, and filter deals by price-to-mileage in one place.
How It Works
- Browser Context & Anti-Bot Evasion: Used Playwright with persistent browser contexts, randomized viewport/user-agent profiles, human-like scroll pacing, and request jitter so dynamic JavaScript listing pages render cleanly without triggering rate limits or CAPTCHA loops.
- Resilient HTML Parsing: Extracted listing cards and detail pages with BeautifulSoup using fallback CSS/attribute selectors so minor DOM layout tweaks don't break a full crawl.
- pandas Normalization & Deduplication: Standardized inconsistent title strings (extracting model year, displacement, mileage, and clean/salvage title status via regex), dropped cross-posted duplicates, and flagged underpriced outliers relative to model-year medians.
- Flask Search & Comparison UI: Built a lightweight Flask web interface on top of the cleaned dataset to sort by price, mileage, distance, and days-on-market without waiting on slow external site pagination.