Files
apiclaw-toolkit/outlook_reg/DOB_LABEL_PATCH.md
T

56 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ai-register-machine — Fluent DOB label-intercept patch
## Проблема
В `register_core/providers/outlook_browser.py` клик по `#BirthMonthDropdown`
(и `#BirthDayDropdown`) падает с таймаутом 30s:
```
<label for="BirthMonthDropdown"> ... intercepts pointer events
```
Fluent UI рендерит `<label for=...>` поверх trigger-кнопки dropdown'а.
Playwright отказывается кликать «чужой» элемент.
## Фикс (проверен вживую: run3 прошёл DOB → name → submit)
Патч клик-хелпера dropdown'ов:
```python
def _click_dropdown(page, trigger_id: str):
btn = page.locator(f"#{trigger_id}")
btn.wait_for(state="visible", timeout=15000)
try:
btn.click(timeout=8000)
except Exception:
# Fluent label перехватывает pointer events —
# клик по label[for=...] открывает тот же dropdown (HTML label semantics)
lbl = page.locator(f'label[for="{trigger_id}"]')
if lbl.count():
lbl.click(timeout=8000)
else:
btn.click(force=True, timeout=8000)
```
Порядок опций после открытия dropdown'а: `[role=option]`, месяц — **числовой**
текст (например `5`, не «май»), день — число, год — отдельный input
`#floatingLabelInput24` (не dropdown).
## Риск-классификация после submit
| Сигнал на странице | Значение | Действие |
|--------------------|----------|----------|
| `iframe#enforcementFrame` / FunCaptcha | решаемо | slidex / manual handoff (captcha_strategy=2) |
| текст «abnormal activity» | хард-блок IP-репутации | смена residential egress, ретрай через N часов |
`retry_loop.sh` — 3 попытки с паузой 20 мин (abnormal-флаг иногда тухнет).
## Заметки по egress
- Free/датацентр-прокси против outlook.live.com: 0 живых (TLS-фингерпринт + IP-бан).
urllib получает 417 — тестировать прокси только curl_cffi (chrome TLS) или браузером.
- Прямой домашний IP: страницы 200, но после submit — abnormal activity,
если IP уже засвечен массовыми попытками.
- Провайдер требует непустой `--proxy-list` → подними `passthrough_proxy.py`
(127.0.0.1:18888) и запиши его в `DIRECT_PROXY.txt`.