# Usage ## The go-to command ```bash python3 dba_pricerunner_scraper.py "YOUR SEARCH" --pricerunner --compare --verdict ``` This fetches DBA (used) + PriceRunner (new) results, prints a comparison table, and gives you a verdict: - ✅ **BUY USED** — used is 20%+ cheaper - 🤔 **DECENT DEAL** — used is 5–20% cheaper - 🏷️ **BUY NEW** — used barely saves anything - ⏳ **WAIT** — used is at or above new price ## All options | Flag | Default | Description | |------|---------|-------------| | `query` | (required) | Search terms (quote multi-word) | | `--engine` | `requests` | `requests` or `selenium` | | `--max` | `15` | Max results to fetch | | `--top N` | — | Show top N results | | `--pricerunner` | off | Also fetch PriceRunner prices | | `--compare` | off | Show side-by-side comparison | | `--verdict` | off | Add buy/wait recommendation | | `--format` | `text` | `text`, `markdown`, or `grid` | | `--min-price` | — | Filter: exclude items below this price | | `--max-price` | — | Filter: exclude items above this price | | `--json` | off | Output raw JSON instead of tables | ## Examples ```bash # Quick verdict (no table) python3 dba_pricerunner_scraper.py "iphone 15" --pricerunner --verdict # Full comparison, markdown format python3 dba_pricerunner_scraper.py "samsung galaxy s24" --pricerunner --compare --verdict --format markdown # Filter out cheap accessories python3 dba_pricerunner_scraper.py "playstation 5 konsol" --pricerunner --compare --verdict --min-price 2000 # ASCII grid for terminal python3 dba_pricerunner_scraper.py "xbox series x konsol" --pricerunner --compare --verdict --format grid # Top 5 DBA only (no PriceRunner) python3 dba_pricerunner_scraper.py "playstation 5" --top 5 # JSON output for scripting python3 dba_pricerunner_scraper.py "iphone 15" --json ``` ## Tips - **Be specific with search terms.** "playstation 5 konsol" gives much better results than "playstation 5" (which picks up games, controllers, and cases). - **Use `--min-price` to filter accessories.** E.g. `--min-price 1000` for phones, `--min-price 2000` for consoles. - **The verdict uses the median used price**, not the cheapest. This avoids outliers (e.g. one broken console at 500 kr dragging the median down). - **PriceRunner picks the lowest new price** across all sellers. This is your "best case" new price. ## Selenium engine If DBA starts blocking `requests`, try: ```bash pip install selenium webdriver-manager python3 dba_pricerunner_scraper.py "playstation 5" --engine selenium --pricerunner --compare --verdict ``` This renders the page in a headless Chrome browser. You need Chrome installed on the system.