Commit graph

5 commits

Author SHA1 Message Date
John Mizerek
eda2ce2db4 Fix DoorDash GraphQL: remove unused variable declarations
shouldFetchPresetCarousels and shouldFetchStoreLiteData were declared
in the query signature but not used in the body, causing 400 errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:17:00 -07:00
John Mizerek
59dfd602cf Use production GraphQL query for DoorDash modifier extraction
The minimal query was rejected by DoorDash's schema validation.
Replaced with production-matching query including OptionListFragment,
OptionFragment, and NestedExtrasFragment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:14:11 -07:00
John Mizerek
2cf5039c0f DoorDash modifiers: direct GraphQL API calls instead of clicking
Instead of clicking each menu item (broken by virtual scrolling),
extract item IDs from embedded JSON and make direct fetch() calls
to the itemPage GraphQL endpoint. 5 concurrent requests per batch.
Much faster and 100% reliable - no DOM interaction needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:11:03 -07:00
John Mizerek
f5974a5fa2 Improve DoorDash modifier extraction: pass item names to Playwright
- Pass extracted item names via temp JSON file so Playwright knows exactly
  what to click instead of guessing from DOM selectors (7 → 171 items)
- Use TreeWalker for exact text matching and aggressive scrolling
- Better price parsing: handle cents (int), dollars (string), displayPrice
- Improved modal dismissal with overlay click fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:02:27 -07:00
John Mizerek
b14f26ed47 Add DoorDash modifier extraction via stealth Playwright
- New doordash-modifiers.js: stealth Playwright script that clicks each
  menu item on a DoorDash page, captures itemPage GraphQL responses,
  and extracts optionLists (modifier groups with options and prices)
- Wire modifier extraction into DoorDash fast-path in analyzeMenuUrl.cfm:
  after parsing items/categories, runs modifier script and maps results
- Improved business info extraction: address, phone, and hours now use
  position-based parsing of StoreHeaderAddress, StoreHeaderPhoneNumber,
  and StoreOperationHoursRange embedded data (fixes intermittent missing info)
- Add playwright-extra and stealth plugin to package.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 12:58:00 -07:00