Bypass Instagram's DOM with computer vision to automate likes
Use landmarks like the triple-dots menu to find hearts via template matching.
Instagram’s DOM is a mess of random class names that change with every deployment, breaking any script that relies on selectors. But the UI is for humans—a heart icon has to look like a heart. So instead of fighting the DOM, take a screenshot, find the triple-dots menu and action bar as easy-to-detect landmarks, crop to the vertical strip between them, then run template matching to find hearts. A sliding window catches every possible heart, but false positives are filtered by discarding detections more than 10 pixels away from the most common X coordinate—the consensus line. This works on any pixel-rendered UI: web apps, native apps, games, terminals. No selectors, no APIs, just computer vision and cursor automation.
- Uses triple-dots menu and action bar as landmarks to define a vertical strip for heart detection, adapting to any post layout.
- Template matching with a loose threshold catches all hearts, then column filtering removes false positives (hearts are vertically aligned).
- Works on any pixel-rendered interface (web, native apps) but risks account ban if used aggressively for engagement automation.
Why It Matters
Provides a robust DOM-agnostic automation technique for UI testing or scraping, but with serious ban risks for social media engagement.