# Mtg Argentina Playwright

> Scrape full catalogs of Argentine MTG stores using Playwright MCP. Walks pagination correctly across Bazaar of Baghdad, Rancho Store TCG, Labatikueva, Al Battle TCG, Phoenix Reborn. Use when surveying stores for deals across product categories (Collector Boxes, Bundles, Secret Lairs, Commander Decks, etc).

- Skill: `rodrijuarez/mtg-argentina-playwright` (Agent Skill)
- Install (CLI): `npx skillmds@latest add rodrijuarez/mtg-argentina-playwright`
- Raw SKILL.md: https://api.skillmd.com/api/skills/rodrijuarez/mtg-argentina-playwright/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: rodrijuarez (https://skillmd.com/u/rodrijuarez)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/rodrijuarez/mtg-argentina-playwright

---


# MTG Argentina — Playwright Full-Catalog Scraper

## When to use
- User asks "what deals are at store X?" or "survey all stores"
- Comparing prices for a specific product across all Argentine retailers
- Looking for SLDs / bundles / commander collections / sealed
- Verifying stock + pricing for a planned purchase

## CRITICAL — Walk ALL pages, not just page 1

Most stores paginate with **12 products per page**. A category claiming "Secret Lairs" or "Booster Boxes" typically has 3-5 pages. **Always check for pagination and walk every page.**

## Required tools
- `mcp__plugin_playwright_playwright__browser_navigate` — load page
- `mcp__plugin_playwright_playwright__browser_evaluate` — extract products via JS
- `mcp__plugin_playwright_playwright__browser_wait_for` — handle Cloudflare delays
- `mcp__plugin_playwright_playwright__browser_close` — cleanup

## Standard scraping flow

### 1. Navigate to category page 1
```
browser_navigate(url=STORE_CATEGORY_URL)
```

### 2. Wait if needed
Phoenix Reborn has Cloudflare → wait 8 seconds:
```
browser_wait_for(time=8)
```

### 3. Extract products + detect pagination
```js
() => {
  const products = [];
  document.querySelectorAll('li.product, .product, .item-product, .js-item-product').forEach(card => {
    const name = card.querySelector('.woocommerce-loop-product__title, h2, h3, .name, .js-item-name')?.textContent?.trim();
    const price = card.querySelector('.price, .woocommerce-Price-amount, .js-price-display, .item-price')?.textContent?.trim();
    const stock = card.classList.contains('outofstock') ? 'OOS' : 'in stock';
    if (name) products.push({ name, price, stock });
  });
  const pages = [...document.querySelectorAll('.page-numbers, .pagination a')]
    .map(a => a.textContent.trim())
    .filter(t => /^\d+$/.test(t));
  return { products, maxPage: pages.length ? Math.max(...pages.map(Number)) : 1 };
}
```

### 4. Walk pagination — URL pattern per store

| Store | Pagination URL pattern |
|-------|------------------------|
| **Bazaar** | `https://bazaarmtg.com/categoria-producto/magic-the-gathering/<category>/page/N/` |
| **Rancho** | `https://ranchostoretcg.com.ar/categoria-producto/magic/page/N/` |
| **Phoenix Reborn** | `https://phoenixreborn.com.ar/inicio/mtg/page/N/` |
| **Labatikueva** | `https://www.labatikuevastore.com/magic-the-gathering/?mpage=N` (Tiendanube) |
| **Al Battle** | `https://albattletcg.com/magic/<category>/?mpage=N` (Tiendanube) |

### 5. Loop until last page

```python
# Pseudocode
page = 1
all_products = []
while True:
    navigate(category_url + f"/page/{page}/")
    result = evaluate(scrape_js)
    if not result.products:
        break
    all_products.extend(result.products)
    if page >= result.maxPage:
        break
    page += 1
```

### 6. Close browser
```
browser_close()
```

## Store-specific notes

### Bazaar of Baghdad (bazaarmtg.com)
- WooCommerce-based, 12 products/page
- Cash discount: not explicit on site
- Bank transfer discount: assume 5% (verify if needed)
- Categories: `/categoria-producto/magic-the-gathering/<slug>/`
  - `secret-lair` (5 pages, 60 SLDs)
  - `booster-box` (5 pages, 60 boxes)
  - `bundle` (2 pages, 14 bundles)
  - `spellbook` (1 page)
  - `decks-mazos` (1 page)
  - `commander-collection` (1 page)
  - `pre-release` (1 page)

### Rancho Store TCG (ranchostoretcg.com.ar)
- WooCommerce-based, 12 products/page
- Cash discount: 10% (efectivo)
- Bank transfer discount: 5%
- Best for: Marvel preorders, Hobbit/RF preorders, Lorwyn Collector
- Category: `/categoria-producto/magic/page/N/`
- 10+ pages of total Magic catalog

### Labatikueva (labatikuevastore.com)
- Tiendanube platform — DIFFERENT pagination
- URL: `/magic-the-gathering/?mpage=N`
- Need to scroll to load products (JS lazy-loading)
- Products: scroll 5-8 times before scraping
- Cash discount: ~5%
- Selector: `.js-item-product, .item-card, [data-product-id]`

### Al Battle TCG (albattletcg.com)
- Tiendanube — same as Labatikueva
- Cash/transfer discount: **10%** (best!)
- Often deep markdowns on Play Boxes (15-25% off)
- Categories: `/magic/<sub>/?mpage=N`
  - `booster-box1` = play boxes
  - `collector-booster-box` = collectors

### Phoenix Reborn (phoenixreborn.com.ar)
- WooCommerce + Cloudflare protection
- **Must wait 5-8 seconds** for Cloudflare to clear
- Discount: variable
- Best for: Hobbit Collector (specialty)
- URL: `/inicio/mtg/page/N/`

## Price interpretation

Argentine prices use **periods as thousand separators**:
- `$ 800.000,00` = 800,000 ARS
- `$ 1.740.000,00` = 1,740,000 ARS

**Always convert to USD using the CURRENT exchange rate (ask the user — never assume from memory).** Argentine peso moves weekly.

Apply discount AFTER conversion:
- Cash: -10% (Rancho, Al Battle)
- Transfer: -5% (most stores)

## Common pitfalls

- **Don't trust page 1 only** — most categories have 3-5 pages
- **Don't skip pagination detection** — walk every page
- **Don't forget Cloudflare wait** for Phoenix Reborn (5-8s)
- **Don't ignore Tiendanube scroll** for Labatikueva/Al Battle (lazy-loaded)
- **Don't conflate ARS thousand-separator periods with decimal points**
- **Don't apply cash discount twice** if site already shows discounted price
- **Don't assume exchange rate** — always confirm with the user

## Output format

Always produce:
1. **Total product count** across all pages
2. **Best deals** ranked by % below market
3. **Cross-store comparison** for same product when available
4. **TCG market verification** for suspected deals via Scryfall/MTGStocks

## Example workflow

User: "Survey Bazaar Secret Lairs"

1. Navigate page 1 → extract 12 products + detect 5 total pages
2. Navigate page 2 → extract 12 products
3. Navigate page 3 → extract 12 products
4. Navigate page 4 → extract 12 products
5. Navigate page 5 → extract 12 products
6. Close browser
7. Verify top candidates via TCGPlayer/MTGStocks
8. Report ranked deals

