3 Duplicate Instagram Posts in 8 Hours: Anatomy of a False-Negative Success Check
Описание и применение
Автоматизированный скрипт публикации в Instagram повторно публиковал один и тот же карусельный пост из‑за ложного отрицания проверки успешности. Внедрение нормализации текста, приоритезации API‑проверки и отказоустойчивого дизайна устранило дублирование.
Задача
Automated Instagram posting script repeatedly posted the same carousel three times due to a false-negative verification that misidentified a successful post as a failure.
Результат
The fixes eliminated duplicate posts by normalizing text, prioritizing API verification, and adopting a fail-closed strategy, ensuring accurate success detection and preventing unnecessary retries.
Рабочий процесс
- Generate caption and post carousel via IG API
- Run _verify_landed() to compare first 12 chars of caption with DOM inner_text
- If ok:false, scheduler retries next slot
- If verification fails repeatedly, duplicate posts occur
Доказательства
_verify_landed() fetched the profile page DOM and compared the first 12 characters of the body text with the first 12 characters of the caption.
The fix, in three parts: 1. Caption normalization, 2. API-first lookup, 3. Fail-closed design.
- Дата записи: 2026-09-21T12:15:46.083Z