37 lines
2.7 KiB
Markdown
37 lines
2.7 KiB
Markdown
# You.com — New Survey + Modal Key Creation Flow (Oct 2026)
|
|
|
|
As of Oct 2026, the Sep 2026 survey walker is broken. The UI changed completely:
|
|
|
|
## Flow (verified end-to-end, $100 credits extracted)
|
|
|
|
1. **OTP login** still works: submit email → IMAP code → magic link → logged in
|
|
2. **Survey**: "How did you hear about us?" — multi-select with 12 options (Podcast/newsletter, Instagram/TikTok/YouTube, Google, ChatGPT/Claude, GitHub, LinkedIn, Twitter/X, Word of mouth, etc.) + **"Get started"** button
|
|
- Click a radio button option, then click "Get started" (native playwright locator `page.get_by_text('Get started').first`)
|
|
- After Get started → redirected to `/platform`
|
|
3. **Keys page**: `/platform/keys` returns 404. The new keys page is **`/platform`** — dashboard with "Create your API key" section and "+ Create API key" button.
|
|
4. **Create key modal**: Clicking "+ Create API key" opens modal "New API key" with:
|
|
- Input: "Key name*" (single text field)
|
|
- Buttons: Cancel / **Create** (black, right)
|
|
5. **Fill name**: Use native playwright `page.locator('input:not([type=hidden])').first.fill('key-1')` — NOT JS value setter (React deadlocks on synthetic events)
|
|
6. **Click Create**: `page.locator("button:has-text('Create'):not(:has-text('key'))").last` — `.first` hits the BACKGROUND "+ Create API key" button, reopening the modal instead of submitting. Use **`.last`** to target the modal button.
|
|
7. **Key**: ydc- format (same regex `ydc-[A-Za-z0-9_-]{10,}`), visible in page HTML after creation and in network responses
|
|
|
|
## Network interceptor pattern (catches key even if page scan fails)
|
|
```python
|
|
CAPTURED = []
|
|
async def on_resp(resp):
|
|
ct = resp.headers.get('content-type', '')
|
|
if 'json' in ct:
|
|
body = await resp.text()
|
|
if 'ydc-' in body:
|
|
CAPTURED.append({'url': resp.url, 'body': body})
|
|
page.on('response', on_resp)
|
|
```
|
|
|
|
## Pitfalls
|
|
- **Button targeting**: There are TWO visible "Create" buttons: the background "+ Create API key" and the modal "Create". `.first` = background = opens a new modal (breaks flow). Use `button:has-text('Create'):not(:has-text('key')).last`.
|
|
- **Survey URL never changes** during survey steps — don't wait for URL change; use DOM content detection.
|
|
- **JS value setter on React inputs**: `Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value').set.call(...)` triggers React but may deadlock. Prefer native playwright `locator.fill()`.
|
|
- **find_keys still works** on page HTML after successful key creation — the ydc- key appears in the DOM.
|
|
- **$10 base + $90 verification**: Account starts with $10. GitHub/work-email verification adds $90. Registration flow sets OTP-only auth (no password). Subsequent logins need OTP magic link.
|