You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rewrite On3 image extraction to use closest-image-to-slug approach
The previous impl required a quote character before /rivals/ which
didn't match Next.js JSON data attributes or other encoding variants,
causing extractOn3Image() to always return null.
New strategy:
1. preg_match_all to collect ALL on3static image positions
2. preg_match_all to collect ALL /rivals/ and /db/ profile paths
3. Find the path whose slug matches the player name (full slug first,
then first-two-parts fallback for Jr./suffix differences)
4. Return the on3static image with the smallest positional distance
to the matched path (threshold 8 000 chars)
No quote-character requirement — matches hrefs, JSON strings, Next.js
__NEXT_DATA__ and any other encoding On3 uses.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>